summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranton <anton@openbsd.org>2017-07-19 15:17:49 +0000
committeranton <anton@openbsd.org>2017-07-19 15:17:49 +0000
commit2fe34725c1775bd664c610ee1006b614daf8151a (patch)
treed9202663484788984fb9d223ef8a9c690cb88b40
parentAvoid additional div0 in case both ntracks & nsectors passed in (diff)
downloadwireguard-openbsd-2fe34725c1775bd664c610ee1006b614daf8151a.tar.xz
wireguard-openbsd-2fe34725c1775bd664c610ee1006b614daf8151a.zip
Fix failing tests when executed as a user without a ~/.mailrc configuration file.
While here, fix a flaky test.
-rw-r--r--regress/usr.bin/mail/send.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/regress/usr.bin/mail/send.sh b/regress/usr.bin/mail/send.sh
index bbbd2581dba..0688b702d24 100644
--- a/regress/usr.bin/mail/send.sh
+++ b/regress/usr.bin/mail/send.sh
@@ -35,8 +35,16 @@ testseq() {
return 1
}
+# Create a fake HOME with a minimal .mailrc.
+tmp=$(mktemp -d)
+trap 'rm -r $tmp' 0
+cat >$tmp/.mailrc <<!
+set ask
+!
+
+HOME=$tmp
MALLOC_OPTIONS=S
-export MALLOC_OPTIONS
+export HOME MALLOC_OPTIONS
# NL: New line.
testseq "\n" "Subject: \r\n"
@@ -46,7 +54,7 @@ testseq "\0177" "Subject: "
testseq "a\0177" "Subject: a\b \b"
# VINTR: Kill letter.
-testseq "\0003\0003" \
+testseq "\0003" \
"Subject: ^C\r\n(Interrupt -- one more to kill letter)\r\nSubject: "
# VKILL: Kill line.