Merge pull request 'use another for each method and check for device' (#30) from mark22k/crxn-entitydb:test-script into master

Reviewed-on: https://codeberg.org/CRXN/entitydb/pulls/30
This commit is contained in:
Marek Küthe 2023-02-05 12:06:59 +00:00
commit 1c0af810f3
1 changed files with 6 additions and 6 deletions

12
test.sh
View File

@ -8,16 +8,16 @@ if ! jq --version &> /dev/null; then
fi fi
ret=0 ret=0
while read -r l
do for file in *.json; do
if ! jq --exit-status '.route | .[] | .description' < "$l" > /dev/null 2>&1 if ! jq --exit-status '.route | .[] | .device' < "$file" > /dev/null 2>&1
then then
echo "$l is invalid." >&2 echo "$file is invalid." >&2
ret=1 ret=1
else else
#echo "$l is valid." #echo "$file is valid."
: :
fi fi
done < <(find "$PWD" -name '*.json' -type f) done
exit $ret exit $ret