3 # Copyright (c) 2009-2011 Petri Lehtinen <petri@digip.org>
5 # Jansson is free software; you can redistribute it and/or modify
6 # it under the terms of the MIT license. See LICENSE for details.
8 export JSON_SORT_KEYS=1
19 [ "$variant" = "strip" ] && strip=1
21 STRIP=$strip $json_process \
22 <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s
23 valgrind_check $test_log/stderr$s || return 1
26 [ -f $test_path/output$s ] && ref=output$s
28 if ! cmp -s $test_path/$ref $test_log/stdout$s; then
29 echo $variant > $test_log/variant
35 do_run normal && do_run strip
39 valgrind_show_error && return
41 read variant < $test_log/variant
44 echo "VARIANT: $variant"
46 echo "EXPECTED OUTPUT:"
48 [ -f $test_path/output$s ] && ref=output$s
49 nl -bn $test_path/$ref
52 nl -bn $test_log/stdout$s
55 . $top_srcdir/test/scripts/run-tests.sh