#### 'keep first'.
#### If different, global variable "failed" is incremented.
#### If there's an optional 'ignore space' argument, diff -b will
-#### be used instead of cmp to compare the files.
+#### be used instead of cmp to compare the files.
check() {
first=$1; shift
second=$1; shift
case $1 in
'keep first') keepfirst=1 ;;
'ignore space') ignorespace=1 ;;
- *) echo "$0: invalid check() argument \"$1\" in test suite" ;;
+ *) echo "$0: invalid check() argument \"$1\" in test suite" >&2 ;;
esac
shift
done
# check -outfile
mhstore 5 -outfile "$actual" 2>&1 | grep -v '^storing' && \
- echo unexpected output from test-mhstore check -outfile
+ echo unexpected output from test-mhstore check -outfile >&2
check $expected "$actual" 'keep first'
# check -outfile -
-echo 'storing message 5 to stdout' >> "$expected"
+echo 'storing message 5 to stdout' >>"$expected"
mhstore 5 -outfile - >"$actual" 2>&1
check $expected "$actual"