Mercurial > hg > sonic-annotator
changeset 151:a1300db6c63e jams
JSON well-formedness test (currently failing)
author | Chris Cannam |
---|---|
date | Tue, 14 Oct 2014 11:27:43 +0100 |
parents | d86ef0a88fa4 |
children | db83ea0e102d |
files | tests/test-json-destinations/test-json-destinations.sh tests/test-supportprogs/test-supportprogs.sh |
diffstat | 2 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-json-destinations/test-json-destinations.sh Tue Oct 14 11:24:05 2014 +0100 +++ b/tests/test-json-destinations/test-json-destinations.sh Tue Oct 14 11:27:43 2014 +0100 @@ -26,7 +26,8 @@ check_json() { test -f $1 || \ fail "Fails to write output to expected location $1 for $2" - ##!!! todo! + cat $1 | json_verify || \ + fail "Writes invalid JSON to location $1 for $2" rm -f $1 }
--- a/tests/test-supportprogs/test-supportprogs.sh Tue Oct 14 11:24:05 2014 +0100 +++ b/tests/test-supportprogs/test-supportprogs.sh Tue Oct 14 11:27:43 2014 +0100 @@ -11,5 +11,8 @@ rapper --version >/dev/null || \ fail "Can't find required rapper program" +echo '{}' | json_verify >/dev/null || \ + fail "Can't find required json_verify program, or it doesn't seem to work" + exit 0