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.
17 if [ "$variant" = "strip" ]; then
18 # This test should not be stripped
19 [ -f $test_path/nostrip ] && return
23 STRIP=$strip $json_process \
24 <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s
25 valgrind_check $test_log/stderr$s || return 1
28 [ -f $test_path/error$s ] && ref=error$s
30 if ! cmp -s $test_path/$ref $test_log/stderr$s; then
31 echo $variant > $test_log/variant
37 do_run normal && do_run strip
41 valgrind_show_error && return
43 read variant < $test_log/variant
46 echo "VARIANT: $variant"
48 echo "EXPECTED ERROR:"
50 [ -f $test_path/error$s ] && ref=error$s
51 nl -bn $test_path/$ref
54 nl -bn $test_log/stderr$s
57 . $top_srcdir/test/scripts/run-tests.sh