~emersion/mrsh

ref: job-control mrsh/test/harness.sh -rw-r--r-- 458 bytes
4b0435e6emersion wip: job control 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
dir=$(dirname "$0")
testcase="$dir/$1"

env
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