3 # Copyright (c) 2009-2012 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.
20 [ "$variant" = "strip" ] && strip=1
22 STRIP=$strip $json_process \
23 <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s
24 valgrind_check $test_log/stderr$s || return 1
27 [ -f $test_path/output$s ] && ref=output$s
29 if ! cmp -s $test_path/$ref $test_log/stdout$s; then
30 echo $variant > $test_log/variant
36 do_run normal && do_run strip
40 valgrind_show_error && return
42 read variant < $test_log/variant
45 echo "VARIANT: $variant"
47 echo "EXPECTED OUTPUT:"
49 [ -f $test_path/output$s ] && ref=output$s
50 nl -bn $test_path/$ref
53 nl -bn $test_log/stdout$s
56 . $top_srcdir/test/scripts/run-tests.sh