~sircmpwn/mrsh

ref: a2f07abd89fd7300a05c42860b856aea72be9687 mrsh/test/harness.sh -rw-r--r-- 454 bytes View raw
a2f07abdSimon Ser Move highlight example to new subdir, add a Meson option for it 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
dir=$(dirname "$0")
testcase="$dir/$1"

echo >&2 "Running with mrsh"
mrsh_out=$("$MRSH" "$testcase")
mrsh_ret=$?
echo >&2 "Running with reference shell"
ref_out=$("$REF_SH" "$testcase")
ref_ret=$?
if [ $mrsh_ret -ne $ref_ret ] || [ "$mrsh_out" != "$ref_out" ]
then
	echo >&2 "$testcase: mismatch"
	echo >&2 ""
	echo >&2 "mrsh: $mrsh_ret"
	echo >&2 "$mrsh_out"
	echo >&2 ""
	echo >&2 "ref: $ref_ret"
	echo >&2 "$ref_out"
	echo >&2 ""
	exit 1
fi