New helper run_and_cmp to automate the job: run a program capturing its standard output, standard error and exit status, then compare the actual with the expected results. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
18 lines
316 B
Bash
Executable file
18 lines
316 B
Bash
Executable file
#!/bin/sh -e
|
|
# Basic fairland test
|
|
|
|
if [ $# -ne 1 ]
|
|
then echo "Usage: $0 SRCDIR" >&2; exit 1
|
|
fi
|
|
|
|
srcdir="$1"
|
|
|
|
. "$srcdir"/tests/test-common.sh
|
|
|
|
create_sandbox
|
|
|
|
$files -f >/dev/null
|
|
run_and_cmp fairland $fairland -s sandbox/newcap_script -R 1 10 30
|
|
|
|
$empdump -x >sandbox/final.xdump
|
|
cmp_out final.xdump newcap_script
|