tests: Use "make STOP=1 check" to stop on first failure
[jansson.git] / test / suites / valid-strip / run
1 #!/bin/sh
2 #
3 # Copyright (c) 2009-2011 Petri Lehtinen <petri@digip.org>
4 #
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.
7
8 export JSON_SORT_KEYS=1
9
10 is_test() {
11     test -d $test_path
12 }
13
14 run_test() {
15     $json_process <$test_path/input >$test_log/stdout 2>$test_log/stderr
16     valgrind_check $test_log/stderr || return 1
17     cmp -s $test_path/output $test_log/stdout
18 }
19
20 show_error() {
21     valgrind_show_error && return
22
23     echo "EXPECTED OUTPUT:"
24     nl -bn $test_path/output
25     echo "ACTUAL OUTPUT:"
26     nl -bn $test_log/stdout
27 }
28
29 . $top_srcdir/test/scripts/run-tests.sh