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