tests: Use "make STOP=1 check" to stop on first failure
[jansson.git] / test / suites / invalid-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 is_test() {
9     test -d $test_path
10 }
11
12 run_test() {
13     $json_process <$test_path/input >$test_log/stdout 2>$test_log/stderr
14     valgrind_check $test_log/stderr || return 1
15     cmp -s $test_path/error $test_log/stderr
16 }
17
18 show_error() {
19     valgrind_show_error && return
20
21     echo "EXPECTED ERROR:"
22     nl -bn $test_path/error
23     echo "ACTUAL ERROR:"
24     nl -bn $test_log/stderr
25 }
26
27 . $top_srcdir/test/scripts/run-tests.sh