Skip to content

Commit fef3abb

Browse files
committed
added print passthrough option
1 parent 2593ea6 commit fef3abb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/test_validate_json.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ set +o pipefail
112112
set -o pipefail
113113
echo
114114

115+
# TODO: add failure print silent mode exit code and stdout/stderr
116+
echo "testing print mode"
117+
[ "$(./validate_json.py -p "$data_dir/test.json" | cksum)" = "$(cksum < "$data_dir/test.json")" ] || { echo "print test failed!"; exit 1; }
118+
echo "successfully passed out test json to stdout"
119+
echo "testing print mode with multi-record"
120+
[ "$(./validate_json.py -mp "$data_dir/multirecord.json" | cksum)" = "$(cksum < "$data_dir/multirecord.json")" ] || { echo "print multi-record test failed!"; exit 1; }
121+
echo "successfully passed out multi-record json to stdout"
122+
echo
123+
115124
echo '{ "name": "hari" ' > "$broken_dir/missing_end_quote.json"
116125
check_broken "$broken_dir/missing_end_quote.json"
117126

0 commit comments

Comments
 (0)