summaryrefslogtreecommitdiffabout
path: root/comsat/tests/testsuite.at
Side-by-side diff
Diffstat (limited to 'comsat/tests/testsuite.at') (more/less context) (show whitespace changes)
-rw-r--r--comsat/tests/testsuite.at62
1 files changed, 15 insertions, 47 deletions
diff --git a/comsat/tests/testsuite.at b/comsat/tests/testsuite.at
index 45f3b1e..db2dbd0 100644
--- a/comsat/tests/testsuite.at
+++ b/comsat/tests/testsuite.at
@@ -23,7 +23,7 @@ m4_pushdef([BIFF_MBOX],[`pwd`/mailbox])
dnl ------------------------------------------------------------
dnl comsatcmd
m4_pushdef([comsatcmd],[comsatd --no-site-config --file ./biff.rc dnl
- --set logging.syslog=no --test])
+ --set logging.syslog=no --test=output])
dnl ------------------------------------------------------------
dnl BIFFTEST(DESCR, KW, DATA, CMDLINE, [STDOUT = `'], [STDERR = `'])
@@ -34,8 +34,10 @@ dnl
m4_pushdef([BIFFTEST],[
AT_SETUP([comsatd: $1])
AT_KEYWORDS([comsatd $2])
+AT_CHECK([test -w / && AT_SKIP_TEST
+cwd=`pwd`
$3
-AT_CHECK([test -w / && AT_SKIP_TEST; $4],[0],[$5],[$6])
+],[0],[$4],[$5])
AT_CLEANUP])
AT_INIT
@@ -45,16 +47,9 @@ AT_TESTED([comsatd])
MUT_VERSION(comsatd)
BIFFTEST([default commands],[comsatd00],
-[cwd=`pwd`
+[
MUT_MBCOPY($abs_top_srcdir/testsuite/spool/teaparty.mbox, mailbox)
-cat > biff.rc <<EOT
-tty $cwd/output
-default
-EOT
-chmod 600 biff.rc
-> $cwd/output
-],
-[comsatcmd $cwd/mailbox 0
+comsatcmd $cwd/mailbox 0
sed '1s/^Mail to .*/Mail to test user/' output
],
[Mail to test user
@@ -69,16 +64,9 @@ Have some wine
])
BIFFTEST([non-zero qid],[comsatd01],
-[cwd=`pwd`
+[
MUT_MBCOPY($abs_top_srcdir/testsuite/spool/teaparty.mbox, mailbox)
-cat > biff.rc <<EOT
-tty $cwd/output
-default
-EOT
-chmod 600 biff.rc
-> $cwd/output
-],
-[comsatcmd $cwd/mailbox 9367
+comsatcmd $cwd/mailbox 9367
sed '1s/^Mail to .*/Mail to test user/' output
],
[Mail to test user
@@ -94,16 +82,9 @@ month, and doesn't tell what o'clock it is!
])
BIFFTEST([maildir qid],[comsatd02],
-[cwd=`pwd`
+[
MUT_MBCOPY($abs_top_srcdir/testsuite/maildir/teaparty, mailbox)
-cat > biff.rc <<EOT
-tty $cwd/output
-default
-EOT
-chmod 600 biff.rc
-> $cwd/output
-],
-[test "$MAILDIR_SUPPORT" = yes || AT_SKIP_TEST
+test "$MAILDIR_SUPPORT" = yes || AT_SKIP_TEST
comsatcmd maildir:$cwd/mailbox new/1284627340.M364969P3770Q81.Trurl
sed '1s/^Mail to .*/Mail to test user/' output
],
@@ -119,16 +100,9 @@ What did they draw?
BIFFTEST([MH qid],[comsatd03],
-[cwd=`pwd`
+[
MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty, mailbox)
-cat > biff.rc <<EOT
-tty $cwd/output
-default
-EOT
-chmod 600 biff.rc
-> $cwd/output
-],
-[test "$MH_SUPPORT" = yes || AT_SKIP_TEST
+test "$MH_SUPPORT" = yes || AT_SKIP_TEST
comsatcmd mh:$cwd/mailbox teaparty/58
sed '1s/^Mail to .*/Mail to test user/' output
],
@@ -144,16 +118,13 @@ I vote the young lady tells us a story.
])
BIFFTEST([beep command],[comsatd04],
-[cwd=`pwd`
+[
MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox1, mailbox)
cat > biff.rc <<EOT
-tty $cwd/output
beep
EOT
chmod 600 biff.rc
-> $cwd/output
-],
-[comsatcmd $cwd/mailbox 0
+comsatcmd $cwd/mailbox 0
cat output | tr '\a' A
],
[AA])
@@ -166,13 +137,10 @@ echo "You have mail from $1, regarding $2"
])
chmod +x notifier
cat > biff.rc <<EOT
-tty $cwd/output
exec $cwd/notifier '\$H{from}' '\$H{Subject}'
EOT
chmod 600 biff.rc
-> $cwd/output
-],
-[comsatcmd $cwd/mailbox 0
+comsatcmd $cwd/mailbox 0
cat output
],
[You have mail from March Hare <hare@wonder.land>, regarding Invitation

Return to:

Send suggestions and report system problems to the System administrator.