~emersion/mrsh

ref: 845da7c44465fda142ca324c6ff57613a8c39ea2 mrsh/test/conformance/harness.sh -rw-r--r-- 353 bytes
845da7c4Drew DeVault test: overhaul conformance tests 1 year, 22 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
dir=$(dirname "$0")
testcase="$1"
stdout="${testcase%%.sh}.stdout"

# Set TEST_SHELL to quickly compare the conformance of different shells
mrsh=${TEST_SHELL:-$MRSH}

actual_out=$("$mrsh" "$testcase")
actual_ret=$?

if [ -f "$stdout" ]
then
	stdout="$(cat "$stdout")"
	if [ "$stdout" != "$actual_out" ]
	then
		exit 1
	fi
fi

exit $actual_ret