Add pythons json.load() as test comparison

This commit is contained in:
Ole Morud
2023-06-05 22:27:23 +02:00
parent 3234fbbea5
commit 039adb06b7
2 changed files with 11 additions and 2 deletions

11
test.sh
View File

@@ -1,4 +1,4 @@
#!/bin/bash #!/bin/zsh
# Build debug (./bin/release/parse) # Build debug (./bin/release/parse)
# make -B # make -B
@@ -64,5 +64,14 @@ for file in sample-files/*.json; do
echo "" echo ""
done done
# compare with python JSON.load()
stderr_output=$(mktemp)
echo -n "(release) comparing with python: "
time_cmd python3 <<EOS 1>/dev/null 2>$stderr_output
import json
print(json.load(open("sample-files/large-file.json")))
EOS
cat $stderr_output
exit $ok exit $ok