mirror of
https://github.com/json-c/json-c.git
synced 2026-03-18 20:49:07 +08:00
Extend the run_output_test() function so we actually can pass command line parameters and so we can support different output files for the same test executable. Also provide some hints about what to do if a test fails (i.e. set VERBOSE=1).
23 lines
387 B
Bash
Executable File
23 lines
387 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Common definitions
|
|
if test -z "$srcdir"; then
|
|
srcdir="${0%/*}"
|
|
test "$srcdir" = "$0" && srcdir=.
|
|
test -z "$srcdir" && srcdir=.
|
|
fi
|
|
. "$srcdir/test-defs.sh"
|
|
|
|
run_output_test test1
|
|
_err=$?
|
|
|
|
for flag in plain spaced pretty ; do
|
|
run_output_test -o test1Formatted_${flag} test1Formatted ${flag}
|
|
_err2=$?
|
|
if [ $_err -eq 0 ] ; then
|
|
_err=$_err2
|
|
fi
|
|
done
|
|
|
|
exit $_err
|