feat(package): hemar: some stages of parsing

This commit is contained in:
2025-11-25 13:19:45 +00:00
parent f5d412997e
commit 4729770b59
9 changed files with 359 additions and 60 deletions

View File

@@ -0,0 +1,24 @@
#!/bin/dash
# $test - test and assertion file
json_diff() {
temp1=$(mktemp)
temp2=$(mktemp)
yq -I=0 -o=j -n "$1" >"$temp1"
yq -I=0 -o=j -n "$2" >"$temp2"
if ! diff -q "$temp1" "$temp2"; then
log error "$(yq -o=j -n "$1")" and "$(yq -o=j -n "$2")"
exit 1
fi
}
# run test
mkdir './test'
# shellcheck disable=SC2154
cp -r "$test"/* './test/'
# shellcheck disable=SC2164
cd './test'
. './run.sh'