summaryrefslogtreecommitdiff
path: root/comsat/tests/testsuite.at
diff options
context:
space:
mode:
Diffstat (limited to 'comsat/tests/testsuite.at')
-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 45f3b1e46..db2dbd02f 100644
--- a/comsat/tests/testsuite.at
+++ b/comsat/tests/testsuite.at
@@ -23,7 +23,7 @@ m4_pushdef([BIFF_MBOX],[`pwd`/mailbox])
23dnl ------------------------------------------------------------ 23dnl ------------------------------------------------------------
24dnl comsatcmd 24dnl comsatcmd
25m4_pushdef([comsatcmd],[comsatd --no-site-config --file ./biff.rc dnl 25m4_pushdef([comsatcmd],[comsatd --no-site-config --file ./biff.rc dnl
26 --set logging.syslog=no --test]) 26 --set logging.syslog=no --test=output])
27 27
28dnl ------------------------------------------------------------ 28dnl ------------------------------------------------------------
29dnl BIFFTEST(DESCR, KW, DATA, CMDLINE, [STDOUT = `'], [STDERR = `']) 29dnl BIFFTEST(DESCR, KW, DATA, CMDLINE, [STDOUT = `'], [STDERR = `'])
@@ -34,8 +34,10 @@ dnl
34m4_pushdef([BIFFTEST],[ 34m4_pushdef([BIFFTEST],[
35AT_SETUP([comsatd: $1]) 35AT_SETUP([comsatd: $1])
36AT_KEYWORDS([comsatd $2]) 36AT_KEYWORDS([comsatd $2])
37AT_CHECK([test -w / && AT_SKIP_TEST
38cwd=`pwd`
37$3 39$3
38AT_CHECK([test -w / && AT_SKIP_TEST; $4],[0],[$5],[$6]) 40],[0],[$4],[$5])
39AT_CLEANUP]) 41AT_CLEANUP])
40 42
41AT_INIT 43AT_INIT
@@ -45,16 +47,9 @@ AT_TESTED([comsatd])
45MUT_VERSION(comsatd) 47MUT_VERSION(comsatd)
46 48
47BIFFTEST([default commands],[comsatd00], 49BIFFTEST([default commands],[comsatd00],
48[cwd=`pwd` 50[
49MUT_MBCOPY($abs_top_srcdir/testsuite/spool/teaparty.mbox, mailbox) 51MUT_MBCOPY($abs_top_srcdir/testsuite/spool/teaparty.mbox, mailbox)
50cat > biff.rc <<EOT 52comsatcmd $cwd/mailbox 0
51tty $cwd/output
52default
53EOT
54chmod 600 biff.rc
55> $cwd/output
56],
57[comsatcmd $cwd/mailbox 0
58sed '1s/^Mail to .*/Mail to test user/' output 53sed '1s/^Mail to .*/Mail to test user/' output
59], 54],
60[Mail to test user 55[Mail to test user
@@ -69,16 +64,9 @@ Have some wine
69]) 64])
70 65
71BIFFTEST([non-zero qid],[comsatd01], 66BIFFTEST([non-zero qid],[comsatd01],
72[cwd=`pwd` 67[
73MUT_MBCOPY($abs_top_srcdir/testsuite/spool/teaparty.mbox, mailbox) 68MUT_MBCOPY($abs_top_srcdir/testsuite/spool/teaparty.mbox, mailbox)
74cat > biff.rc <<EOT 69comsatcmd $cwd/mailbox 9367
75tty $cwd/output
76default
77EOT
78chmod 600 biff.rc
79> $cwd/output
80],
81[comsatcmd $cwd/mailbox 9367
82sed '1s/^Mail to .*/Mail to test user/' output 70sed '1s/^Mail to .*/Mail to test user/' output
83], 71],
84[Mail to test user 72[Mail to test user
@@ -94,16 +82,9 @@ month, and doesn't tell what o'clock it is!
94]) 82])
95 83
96BIFFTEST([maildir qid],[comsatd02], 84BIFFTEST([maildir qid],[comsatd02],
97[cwd=`pwd` 85[
98MUT_MBCOPY($abs_top_srcdir/testsuite/maildir/teaparty, mailbox) 86MUT_MBCOPY($abs_top_srcdir/testsuite/maildir/teaparty, mailbox)
99cat > biff.rc <<EOT 87test "$MAILDIR_SUPPORT" = yes || AT_SKIP_TEST
100tty $cwd/output
101default
102EOT
103chmod 600 biff.rc
104> $cwd/output
105],
106[test "$MAILDIR_SUPPORT" = yes || AT_SKIP_TEST
107comsatcmd maildir:$cwd/mailbox new/1284627340.M364969P3770Q81.Trurl 88comsatcmd maildir:$cwd/mailbox new/1284627340.M364969P3770Q81.Trurl
108sed '1s/^Mail to .*/Mail to test user/' output 89sed '1s/^Mail to .*/Mail to test user/' output
109], 90],
@@ -119,16 +100,9 @@ What did they draw?
119 100
120 101
121BIFFTEST([MH qid],[comsatd03], 102BIFFTEST([MH qid],[comsatd03],
122[cwd=`pwd` 103[
123MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty, mailbox) 104MUT_MBCOPY($abs_top_srcdir/testsuite/mh/teaparty, mailbox)
124cat > biff.rc <<EOT 105test "$MH_SUPPORT" = yes || AT_SKIP_TEST
125tty $cwd/output
126default
127EOT
128chmod 600 biff.rc
129> $cwd/output
130],
131[test "$MH_SUPPORT" = yes || AT_SKIP_TEST
132comsatcmd mh:$cwd/mailbox teaparty/58 106comsatcmd mh:$cwd/mailbox teaparty/58
133sed '1s/^Mail to .*/Mail to test user/' output 107sed '1s/^Mail to .*/Mail to test user/' output
134], 108],
@@ -144,16 +118,13 @@ I vote the young lady tells us a story.
144]) 118])
145 119
146BIFFTEST([beep command],[comsatd04], 120BIFFTEST([beep command],[comsatd04],
147[cwd=`pwd` 121[
148MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox1, mailbox) 122MUT_MBCOPY($abs_top_srcdir/testsuite/spool/mbox1, mailbox)
149cat > biff.rc <<EOT 123cat > biff.rc <<EOT
150tty $cwd/output
151beep 124beep
152EOT 125EOT
153chmod 600 biff.rc 126chmod 600 biff.rc
154> $cwd/output 127comsatcmd $cwd/mailbox 0
155],
156[comsatcmd $cwd/mailbox 0
157cat output | tr '\a' A 128cat output | tr '\a' A
158], 129],
159[AA]) 130[AA])
@@ -166,13 +137,10 @@ echo "You have mail from $1, regarding $2"
166]) 137])
167chmod +x notifier 138chmod +x notifier
168cat > biff.rc <<EOT 139cat > biff.rc <<EOT
169tty $cwd/output
170exec $cwd/notifier '\$H{from}' '\$H{Subject}' 140exec $cwd/notifier '\$H{from}' '\$H{Subject}'
171EOT 141EOT
172chmod 600 biff.rc 142chmod 600 biff.rc
173> $cwd/output 143comsatcmd $cwd/mailbox 0
174],
175[comsatcmd $cwd/mailbox 0
176cat output 144cat output
177], 145],
178[You have mail from March Hare <hare@wonder.land>, regarding Invitation 146[You have mail from March Hare <hare@wonder.land>, regarding Invitation

Return to:

Send suggestions and report system problems to the System administrator.