]>
Commit | Line | Data |
---|---|---|
71aad674 A |
1 | # $FreeBSD$ |
2 | # Test that an interactive shell accesses $MAIL. | |
3 | ||
4 | goodfile=/var/empty/sh-test-goodfile | |
5 | mailfile=/var/empty/sh-test-mailfile | |
6 | T=$(mktemp sh-test.XXXXXX) || exit | |
7 | ENV=$goodfile MAIL=$mailfile ktrace -i -f "$T" ${SH} +m -i </dev/null >/dev/null 2>&1 | |
8 | if ! grep -q $goodfile "$T"; then | |
9 | # ktrace problem | |
10 | rc=0 | |
11 | elif grep -q $mailfile "$T"; then | |
12 | rc=0 | |
13 | fi | |
14 | rm "$T" | |
15 | exit ${rc:-3} |