feat(package): hemar: some stages of parsing
This commit is contained in:
24
test/package/hemar/lauch.sh
Normal file
24
test/package/hemar/lauch.sh
Normal 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'
|
||||
Reference in New Issue
Block a user