xref: /freebsd/bin/sh/tests/parameters/mail1.0 (revision b64c5a0ace59af62eff52bfe110a521dc73c937b)
1# Test that a non-interactive shell does not access $MAIL.
2
3goodfile=/var/empty/sh-test-goodfile
4mailfile=/var/empty/sh-test-mailfile
5T=$(mktemp sh-test.XXXXXX) || exit
6MAIL=$mailfile ktrace -t n -i -f "$T" ${SH} -c "[ -s $goodfile ]" 3>/dev/null
7if ! grep -q $goodfile "$T"; then
8	# ktrace problem
9	rc=0
10elif ! grep -q $mailfile "$T"; then
11	rc=0
12fi
13rm "$T"
14exit ${rc:-3}
15