Commit a423eb41 a423eb41d011e73be645b63c3e3b19b993937e1c by Sergey Poznyakoff

Updated

1 parent a32f555d
1 2002-08-20 Sergey Poznyakoff
2
3 * Makefile.am: Added testsuite subdirectory
4 * configure.ac: Likewise.
5 * auth/virtual.c: A couple of bugfixes. Introduced
6 --virtual-passwd-dir switch to override the
7 default placement of virtual domain password files.
8
9 * testsuite: New dir. Common files for all testsuites.
10 * testsuite/lib: New dir.
11 * testsuite/lib/mailutils.exp: New file. Common test driver.
12
13 * mail/testsuite/spool: Moved to ...
14 * testsuite/spool: ... here
15
16 * mail/testsuite/folder: Moved to ...
17 * testsuite/folder: ... here
18
19 * mail/testsuite/etc: Moved to ...
20 * testsuite/etc: ... here
21
22 * mail/testsuite/Makefile.am: Removed etc, spool and folder test
23 dirs.
24 * mail/testsuite/lib/mail.exp: Updated.
25 * mail/testsuite/mail/folder.exp: Updated.
26 * mail/testsuite/mail/write.exp: Updated.
27
1 2002-08-15 Sergey Poznyakoff 28 2002-08-15 Sergey Poznyakoff
2 29
3 * configure.ac: If -lcrypt is present, add it to LIBS 30 * configure.ac: If -lcrypt is present, add it to LIBS
......
...@@ -16,52 +16,20 @@ ...@@ -16,52 +16,20 @@
16 # along with this program; if not, write to the Free Software Foundation, 16 # along with this program; if not, write to the Free Software Foundation,
17 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 verbose "STARTED" 1 19 source ../../testsuite/lib/mailutils.exp
20 if [info exists TOOL_EXECUTABLE] {
21 set MAIL $TOOL_EXECUTABLE
22 }
23 if ![info exists MAIL] {
24 if ![is_remote host] {
25 set MAIL [findfile $base_dir/../mail "$base_dir/../mail" [transform mail]]
26 set MAIL_SPOOL_SOURCE "$srcdir/spool"
27 set MAIL_FOLDER_SOURCE "$srcdir/folder"
28 set MAIL_SPOOL_DIR "$objdir/data/spool"
29 set MAIL_FOLDER_DIR "$objdir/data/folder"
30 set MAIL_RC_DIR "$srcdir/etc"
31 set MAKESPOOL "$srcdir/makespool"
32 } else {
33 if [info exists host_board] {
34 if [board_info $host_board exists top_builddir] {
35 append MAIL "[board_info $host_board top_builddir]/mail/mail"
36 } elseif [board_info $host_board exists top_srcdir] {
37 append MAIL "[board_info $host_board top_srcdir]/mail/mail"
38 }
39 }
40 20
41 if ![info exists MAIL] { 21 set TOOL_NAME "mail"
42 perror "The test suite is not set up for the remote testing" 22 mu_init
43 perror "Please, read file README in mail/testsuite subdirectory"
44 perror "for instructions on how to set up it."
45 exit 1
46 }
47 set MAIL_RC_DIR "[board_info $host_board srcdir]/etc"
48 set MAIL_SPOOL_SOURCE "[board_info $host_board srcdir]/spool"
49 set MAIL_FOLDER_SOURCE "[board_info $host_board srcdir]/folder"
50 set MAIL_SPOOL_DIR "[board_info $host_board objdir]/data/spool"
51 set MAIL_FOLDER_DIR "[board_info $host_board objdir]/data/folder"
52 set MAKESPOOL "[board_info $host_board srcdir]/makespool"
53 }
54 }
55
56 verbose "using MAIL = $MAIL" 2
57 23
58 if ![info exists MAILFLAGS] { 24 if ![info exists MAILFLAGS] {
59 set MAILFLAGS "--nosum --norc --mail-spool $MAIL_SPOOL_DIR" 25 set MAILFLAGS "--nosum --norc --mail-spool $MU_SPOOL_DIR"
60 } 26 }
61 27
28 set MU_TOOL_FLAGS $MAILFLAGS
29
62 #FIXME: this doesn't work with remote testing 30 #FIXME: this doesn't work with remote testing
63 set env(MAILRC) $MAIL_RC_DIR/mail.rc 31 set env(MAILRC) $MU_RC_DIR/mail.rc
64 set env(MBOX) "$MAIL_SPOOL_DIR/mbox" 32 set env(MBOX) "$MU_SPOOL_DIR/mbox"
65 33
66 # The variable mail_prompt is a regexp which matches the mail prompt. 34 # The variable mail_prompt is a regexp which matches the mail prompt.
67 global mail_prompt 35 global mail_prompt
...@@ -71,71 +39,33 @@ if ![info exists mail_prompt] then { ...@@ -71,71 +39,33 @@ if ![info exists mail_prompt] then {
71 39
72 ### Only procedures should come after this point. 40 ### Only procedures should come after this point.
73 41
74 proc mail_prepare_spools {} {
75 global MAIL_SPOOL_SOURCE
76 global MAIL_SPOOL_DIR
77 global MAIL_FOLDER_SOURCE
78 global MAIL_FOLDER_DIR
79 global MAKESPOOL
80
81 set output [remote_exec host "$MAKESPOOL \
82 $MAIL_SPOOL_SOURCE $MAIL_SPOOL_DIR\
83 $MAIL_FOLDER_SOURCE $MAIL_FOLDER_DIR"]
84 }
85
86 proc mail_cleanup_spools {} {
87 global MAIL_SPOOL_SOURCE
88 global MAIL_SPOOL_DIR
89 global MAIL_FOLDER_SOURCE
90 global MAIL_FOLDER_DIR
91 global MAKESPOOL
92
93 if { $MAIL_SPOOL_SOURCE != $MAIL_SPOOL_DIR } {
94 set output [remote_exec host "$MAKESPOOL -r \
95 $MAIL_SPOOL_DIR $MAIL_FOLDER_DIR"]
96 }
97 }
98
99 proc default_mail_version {} {
100 global MAIL
101 global MAILFLAGS
102 global MAILVERSION
103
104 if [info exists MAILVERSION] {
105 return
106 }
107
108 set output [remote_exec host "$MAIL --version"]
109 regexp " \[0-9\]\[^ \t\n\r\]+" "$output" MAILVERSION
110 }
111
112 proc mail_version {} { 42 proc mail_version {} {
113 global MAIL 43 global MU_TOOL
114 global MAILFLAGS 44 global MU_TOOL_FLAGS
115 global MAILVERSION 45 global MU_TOOL_VERSION
116 46
117 default_mail_version 47 mu_version
118 if ![is_remote host] { 48 if ![is_remote host] {
119 clone_output "[which $MAIL] version $MAILVERSION" 49 clone_output "[which $MU_TOOL] version $MU_TOOL_VERSION"
120 } else { 50 } else {
121 clone_output "$MAIL on remote host version $MAILVERSION" 51 clone_output "$MU_TOOL on remote host version $MU_TOOL_VERSION"
122 } 52 }
123 } 53 }
124 54
125 proc default_mail_start {args} { 55 proc default_mail_start {args} {
126 global srcdir
127 global srcdir
128 global verbose 56 global verbose
129 global MAIL 57 global MU_TOOL
130 global MAILFLAGS 58 global MU_TOOL_FLAGS
131 global mail_prompt 59 global mail_prompt
132 global CAPABILITY
133 global expect_out 60 global expect_out
134 61
135 default_mail_version 62 mu_version
136 63
137 set sw $args 64 set sw $args
138 append sw " " 65 append sw " "
66 if [info exists MU_TOOL_FLAGS] {
67 append sw $MU_TOOL_FLAGS
68 }
139 69
140 if [info exists host_board] { 70 if [info exists host_board] {
141 if [board_info $host_board exists top_srcdir] { 71 if [board_info $host_board exists top_srcdir] {
...@@ -143,8 +73,7 @@ proc default_mail_start {args} { ...@@ -143,8 +73,7 @@ proc default_mail_start {args} {
143 } 73 }
144 } 74 }
145 75
146 set mail_cmd "$MAIL $MAILFLAGS $args" 76 set mail_cmd "$MU_TOOL $sw"
147 verbose "MAILRC is $srcdir/etc/mail.rc" 2
148 verbose "Spawning $mail_cmd" 77 verbose "Spawning $mail_cmd"
149 78
150 set res [remote_spawn host $mail_cmd] 79 set res [remote_spawn host $mail_cmd]
...@@ -153,7 +82,7 @@ proc default_mail_start {args} { ...@@ -153,7 +82,7 @@ proc default_mail_start {args} {
153 return 1; 82 return 1;
154 } 83 }
155 84
156 mail_expect 360 { 85 mu_expect 360 {
157 -re "\[\r\n\]?${mail_prompt}$" { 86 -re "\[\r\n\]?${mail_prompt}$" {
158 verbose "mail initialized." 87 verbose "mail initialized."
159 } 88 }
...@@ -185,7 +114,7 @@ proc mail_start {args} { ...@@ -185,7 +114,7 @@ proc mail_start {args} {
185 } 114 }
186 115
187 if {$reuse_spool == 0} { 116 if {$reuse_spool == 0} {
188 mail_prepare_spools 117 mu_prepare_spools
189 } 118 }
190 return [default_mail_start [lrange $args $i end]] 119 return [default_mail_start [lrange $args $i end]]
191 } 120 }
...@@ -197,23 +126,11 @@ proc mail_stop {} { ...@@ -197,23 +126,11 @@ proc mail_stop {} {
197 ## 126 ##
198 127
199 proc mail_send { string } { 128 proc mail_send { string } {
200 global suppress_flag; 129 return [mu_send "$string"]
201 if {[info exists suppress_flag] && $suppress_flag} {
202 return "suppressed";
203 }
204 return [remote_send host "$string"]
205 } 130 }
206 131
207 proc mail_command { cmd } { 132 proc mail_command { cmd } {
208 set res [mail_send "$cmd\n"] 133 return [mu_command $cmd]
209 mail_expect 30 {
210 -ex "\r\n" { }
211 default {
212 perror "mail_command for target failed";
213 return -1
214 }
215 }
216 return $res
217 } 134 }
218 135
219 proc mail_exit {} { 136 proc mail_exit {} {
...@@ -222,179 +139,6 @@ proc mail_exit {} { ...@@ -222,179 +139,6 @@ proc mail_exit {} {
222 return res 139 return res
223 } 140 }
224 141
225 proc mail_expect { args } {
226 global env
227 if { [lindex $args 0] == "-notransfer" } {
228 set notransfer -notransfer;
229 set args [lrange $args 1 end];
230 } else {
231 set notransfer "";
232 }
233
234 if { [llength $args] == 2 && [lindex $args 0] != "-re" } {
235 set gtimeout [lindex $args 0];
236 set expcode [list [lindex $args 1]];
237 } else {
238 upvar timeout timeout;
239
240 set expcode $args;
241 if [target_info exists mail,timeout] {
242 if [info exists timeout] {
243 if { $timeout < [target_info mail,timeout] } {
244 set gtimeout [target_info mail,timeout];
245 } else {
246 set gtimeout $timeout;
247 }
248 } else {
249 set gtimeout [target_info mail,timeout];
250 }
251 }
252
253 if ![info exists gtimeout] {
254 global timeout;
255 if [info exists timeout] {
256 set gtimeout $timeout;
257 } else {
258 # Eeeeew.
259 set gtimeout 60;
260 }
261 }
262 }
263
264 global suppress_flag;
265 global remote_suppress_flag;
266 global verbose
267 if [info exists remote_suppress_flag] {
268 set old_val $remote_suppress_flag;
269 }
270 if [info exists suppress_flag] {
271 if { $suppress_flag } {
272 set remote_suppress_flag 1;
273 }
274 }
275
276 verbose "RUNNING remote_expect host $gtimeout $notransfer $expcode" 2
277
278 set code [catch \
279 {uplevel remote_expect host $gtimeout $notransfer $expcode} string];
280 if [info exists old_val] {
281 set remote_suppress_flag $old_val;
282 } else {
283 if [info exists remote_suppress_flag] {
284 unset remote_suppress_flag;
285 }
286 }
287
288 if {$code == 1} {
289 global errorInfo errorCode;
290
291 return -code error -errorinfo $errorInfo -errorcode $errorCode $string
292 } elseif {$code == 2} {
293 return -code return $string
294 } elseif {$code == 3} {
295 return
296 } elseif {$code > 4} {
297 return -code $code $string
298 }
299 }
300
301 # default_mail_test COMMAND PATTERN
302 # COMMAND - Command to send to mail
303 # PATTERN - A list of strings to expect in return
304 # Return value:
305 # -3 - eof
306 # -2 - timeout
307 # -1 - generic failure
308 # 1 - test fails
309 # 0 - test succeeds
310 proc default_mail_test { args } {
311 global verbose
312 global mail_prompt
313 global suppress_flag
314 global mail_prompt
315 upvar timeout timeout
316
317 set command [lindex $args 0]
318 set pattern [lindex $args 1]
319
320 if { [info exists suppress_flag] && $suppress_flag } {
321 set do_suppress 1
322 } else {
323 set do_suppress 0
324 }
325
326 if $verbose>2 then {
327 send_user "Command: \"$command\"\n"
328 send_user "Pattern: \"$pattern\"\n"
329 }
330
331 set result -1
332 if { "${command}" != "" } {
333 if { [mail_command "${command}"] != "" } {
334 if { ! $do_suppress } {
335 perror "Couldn't send \"$command\".";
336 }
337 return $result;
338 }
339 }
340
341 if [info exists timeout] {
342 set tmt $timeout;
343 } else {
344 global timeout;
345 if [info exists timeout] {
346 set tmt $timeout;
347 } else {
348 set tmt 60;
349 }
350 }
351
352 set result 0
353 for {set i 0} {$i < [llength $pattern]} {incr i} {
354 regsub "\[ \t\]*$" [lindex ${pattern} $i] "" pat
355 verbose "i=$i, pat=$pat" 2
356 mail_expect $tmt {
357 -ex "$pat" {
358 if { $expect_out(buffer) != $expect_out(0,string) } {
359 verbose "Got \"$expect_out(buffer)\"" 2
360 verbose "instead of expected \"$pat\\r\\n\"" 2
361 set result 1
362 break
363 }
364 mail_expect $tmt {
365 -re "\[ \t]*\r\n" { }
366 default {
367 set result 1
368 break
369 }
370 timeout {
371 set result -2
372 break
373 }
374 eof {
375 set result -3
376 break
377 }
378 }
379 }
380 default {
381 set result 1
382 break
383 }
384 timeout {
385 set result -2
386 break
387 }
388 eof {
389 set result -3
390 break
391 }
392 }
393 }
394
395 return $result
396 }
397
398 # mail_test [-message MESSAGE][-default (FAIL|XFAIL)][-noprompt] 142 # mail_test [-message MESSAGE][-default (FAIL|XFAIL)][-noprompt]
399 # COMMAND PATTERN [PATTERN...] 143 # COMMAND PATTERN [PATTERN...]
400 # COMMAND - Command to send to mail. 144 # COMMAND - Command to send to mail.
...@@ -434,9 +178,9 @@ proc mail_test { args } { ...@@ -434,9 +178,9 @@ proc mail_test { args } {
434 } 178 }
435 set command [lindex $args 0] 179 set command [lindex $args 0]
436 set pattern [lrange $args 1 end] 180 set pattern [lrange $args 1 end]
437 set result [default_mail_test $command $pattern] 181 set result [mu_test $command $pattern]
438 if {$wait_for_prompt} { 182 if {$wait_for_prompt} {
439 mail_expect 30 { 183 mu_expect 30 {
440 -re "\[\r\n\]?${mail_prompt}$" {} 184 -re "\[\r\n\]?${mail_prompt}$" {}
441 default { 185 default {
442 perror "mail not initialized" 186 perror "mail not initialized"
...@@ -464,60 +208,4 @@ proc mail_test { args } { ...@@ -464,60 +208,4 @@ proc mail_test { args } {
464 return $result 208 return $result
465 } 209 }
466 210
467 proc mail_test_file {args} {
468 global verbose
469
470 set default ""
471 set message ""
472
473 for {set i 0} {$i < [llength $args]} {incr i} {
474 set a [lindex $args $i]
475 if {"$a" == "-default"} {
476 set default [lindex $args [expr $i + 1]]
477 incr i
478 } elseif {"$a" == "-message"} {
479 set message [lindex $args [expr $i + 1]]
480 incr i
481 } else {
482 set args [lrange $args $i end]
483 break
484 }
485 }
486
487 if {"$message" == ""} {
488 set message "Contents of [lindex $args 0]"
489 }
490
491 if $verbose>2 then {
492 send_user "Message is \"$message\"\n"
493 }
494
495 set filename [lindex $args 0]
496 set pattern [lrange $args 1 end]
497
498 set res [remote_spawn host "/bin/cat $filename"]
499 if { $res < 0 || $res == "" } {
500 perror "Reading $filename failed."
501 return 1;
502 }
503 set result [default_mail_test "" $pattern]
504 if {$result == 0} {
505 pass "$message"
506 } elseif {$result == 1} {
507 if { "$default" == "" || "$default" != "FAIL" } {
508 fail "$message"
509 } else {
510 xfail "$message"
511 set result 0
512 }
513 } elseif {$result == -2} {
514 fail "$message (timeout)"
515 } elseif {$result == -3} {
516 fail "$message (eof)"
517 } else {
518 fail "$message"
519 }
520 return $result
521 }
522
523 211
......
...@@ -22,38 +22,38 @@ ...@@ -22,38 +22,38 @@
22 mail_start "--file=%mbox1" 22 mail_start "--file=%mbox1"
23 mail_command "set readonly" 23 mail_command "set readonly"
24 24
25 mail_command "set folder=\"$MAIL_FOLDER_DIR\"" 25 mail_command "set folder=\"$MU_FOLDER_DIR\""
26 # FIXME: Need -re here 26 # FIXME: Need -re here
27 #mail_test "folders" "one two" 27 #mail_test "folders" "one two"
28 28
29 mail_test "file +one" \ 29 mail_test "file +one" \
30 "Held 4 messages in $MAIL_SPOOL_DIR/mbox1" 30 "Held 4 messages in $MU_SPOOL_DIR/mbox1"
31 mail_test "sum" \ 31 mail_test "sum" \
32 "\"$MAIL_FOLDER_DIR/one\": 1 messages 1 new" 32 "\"$MU_FOLDER_DIR/one\": 1 messages 1 new"
33 mail_test "headers" \ 33 mail_test "headers" \
34 ">N 1 Foo Bar Fri Dec 28 22:18 10/350 Mailbox 1" 34 ">N 1 Foo Bar Fri Dec 28 22:18 10/350 Mailbox 1"
35 35
36 mail_test "file +two" \ 36 mail_test "file +two" \
37 "Held 1 messages in $MAIL_FOLDER_DIR/one" 37 "Held 1 messages in $MU_FOLDER_DIR/one"
38 mail_test "sum" \ 38 mail_test "sum" \
39 "\"$MAIL_FOLDER_DIR/two\": 1 messages 1 new" 39 "\"$MU_FOLDER_DIR/two\": 1 messages 1 new"
40 mail_test "headers" \ 40 mail_test "headers" \
41 ">N 1 Foo Bar Fri Dec 28 22:18 10/350 Mailbox 2" 41 ">N 1 Foo Bar Fri Dec 28 22:18 10/350 Mailbox 2"
42 42
43 mail_test "file #" \ 43 mail_test "file #" \
44 "Held 1 messages in $MAIL_FOLDER_DIR/two" 44 "Held 1 messages in $MU_FOLDER_DIR/two"
45 mail_test "sum" \ 45 mail_test "sum" \
46 "\"$MAIL_FOLDER_DIR/one\": 1 messages 1 new" 46 "\"$MU_FOLDER_DIR/one\": 1 messages 1 new"
47 47
48 mail_test "file #" \ 48 mail_test "file #" \
49 "Held 1 messages in $MAIL_FOLDER_DIR/one" 49 "Held 1 messages in $MU_FOLDER_DIR/one"
50 mail_test "sum" \ 50 mail_test "sum" \
51 "\"$MAIL_FOLDER_DIR/two\": 1 messages 1 new" 51 "\"$MU_FOLDER_DIR/two\": 1 messages 1 new"
52 52
53 mail_test "file &" \ 53 mail_test "file &" \
54 "Held 1 messages in $MAIL_FOLDER_DIR/two" 54 "Held 1 messages in $MU_FOLDER_DIR/two"
55 mail_test "sum" \ 55 mail_test "sum" \
56 "\"$MAIL_SPOOL_DIR/mbox\": 1 messages 1 new" 56 "\"$MU_SPOOL_DIR/mbox\": 1 messages 1 new"
57 mail_test "headers" \ 57 mail_test "headers" \
58 ">N 1 Sergey Poznyakoff Sun Jul 16 12:11 12/429 MBOX" 58 ">N 1 Sergey Poznyakoff Sun Jul 16 12:11 12/429 MBOX"
59 59
......
...@@ -21,7 +21,7 @@ mail_start "--file=%mbox1" ...@@ -21,7 +21,7 @@ mail_start "--file=%mbox1"
21 # Delete first and last message and quit 21 # Delete first and last message and quit
22 mail_command "delete 1 4" 22 mail_command "delete 1 4"
23 mail_test -noprompt "quit" \ 23 mail_test -noprompt "quit" \
24 "Held 2 messages in $MAIL_SPOOL_DIR/mbox1" 24 "Held 2 messages in $MU_SPOOL_DIR/mbox1"
25 25
26 # Start again using the same mailbox 26 # Start again using the same mailbox
27 mail_start -reuse-spool "--file=%mbox1" 27 mail_start -reuse-spool "--file=%mbox1"
...@@ -37,8 +37,8 @@ mail_test "h" \ ...@@ -37,8 +37,8 @@ mail_test "h" \
37 37
38 # ... and quit 38 # ... and quit
39 mail_test -noprompt "quit" \ 39 mail_test -noprompt "quit" \
40 "Saved 1 messages in $MAIL_SPOOL_DIR/mbox" \ 40 "Saved 1 messages in $MU_SPOOL_DIR/mbox" \
41 "Held 1 messages in $MAIL_SPOOL_DIR/mbox1" 41 "Held 1 messages in $MU_SPOOL_DIR/mbox1"
42 42
43 # Now check the mbox contents 43 # Now check the mbox contents
44 mail_start -reuse-spool "--file=%mbox" 44 mail_start -reuse-spool "--file=%mbox"
...@@ -47,30 +47,30 @@ mail_test "headers" \ ...@@ -47,30 +47,30 @@ mail_test "headers" \
47 " U 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky" 47 " U 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"
48 48
49 # Save messages to the third mailbox 49 # Save messages to the third mailbox
50 mail_command "set folder=\"$MAIL_FOLDER_DIR\"" 50 mail_command "set folder=\"$MU_FOLDER_DIR\""
51 mail_test "save 1 2 +three" \ 51 mail_test "save 1 2 +three" \
52 "\"$MAIL_FOLDER_DIR/three\" 28/1008" 52 "\"$MU_FOLDER_DIR/three\" 28/1008"
53 53
54 mail_test "headers" \ 54 mail_test "headers" \
55 ">* 1 Sergey Poznyakoff Sun Jul 16 12:11 12/429 MBOX"\ 55 ">* 1 Sergey Poznyakoff Sun Jul 16 12:11 12/429 MBOX"\
56 " * 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky" 56 " * 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"
57 57
58 mail_test -noprompt "quit" \ 58 mail_test -noprompt "quit" \
59 "Held 0 messages in $MAIL_SPOOL_DIR/mbox" 59 "Held 0 messages in $MU_SPOOL_DIR/mbox"
60 60
61 # Examine its contents 61 # Examine its contents
62 mail_start -reuse-spool "--file=$MAIL_FOLDER_DIR/three" 62 mail_start -reuse-spool "--file=$MU_FOLDER_DIR/three"
63 mail_test "headers" \ 63 mail_test "headers" \
64 ">N 1 Sergey Poznyakoff Sun Jul 16 12:11 12/429 MBOX"\ 64 ">N 1 Sergey Poznyakoff Sun Jul 16 12:11 12/429 MBOX"\
65 " U 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky" 65 " U 2 Bar Fri Dec 28 23:28 16/579 Re: Jabberwocky"
66 66
67 # Test uppercase commands (Save and Copy) 67 # Test uppercase commands (Save and Copy)
68 mail_command "set outfolder=\"$MAIL_FOLDER_DIR\"" 68 mail_command "set outfolder=\"$MU_FOLDER_DIR\""
69 mail_test "Save" \ 69 mail_test "Save" \
70 "\"$MAIL_FOLDER_DIR/gray\" 12/429" 70 "\"$MU_FOLDER_DIR/gray\" 12/429"
71 71
72 mail_test "file \"$MAIL_FOLDER_DIR/gray\"" \ 72 mail_test "file \"$MU_FOLDER_DIR/gray\"" \
73 "Held 1 messages in $MAIL_FOLDER_DIR/three" 73 "Held 1 messages in $MU_FOLDER_DIR/three"
74 74
75 mail_test "headers" \ 75 mail_test "headers" \
76 ">N 1 Sergey Poznyakoff Sun Jul 16 12:11 12/429 MBOX" 76 ">N 1 Sergey Poznyakoff Sun Jul 16 12:11 12/429 MBOX"
...@@ -78,24 +78,24 @@ mail_exit ...@@ -78,24 +78,24 @@ mail_exit
78 78
79 # Test write 79 # Test write
80 mail_start -reuse-spool "--file=%teaparty.mbox" 80 mail_start -reuse-spool "--file=%teaparty.mbox"
81 mail_command "set outfolder=\"$MAIL_FOLDER_DIR\"" 81 mail_command "set outfolder=\"$MU_FOLDER_DIR\""
82 mail_test "write" \ 82 mail_test "write" \
83 "\"$MAIL_FOLDER_DIR/1\" 1/15" 83 "\"$MU_FOLDER_DIR/1\" 1/15"
84 84
85 mail_test "write 2 3 tmp" \ 85 mail_test "write 2 3 tmp" \
86 "\"$MAIL_FOLDER_DIR/tmp\" 2/37" 86 "\"$MU_FOLDER_DIR/tmp\" 2/37"
87 87
88 mail_test "Write 1 2 3" \ 88 mail_test "Write 1 2 3" \
89 "\"$MAIL_FOLDER_DIR/hare\" 3/52" 89 "\"$MU_FOLDER_DIR/hare\" 3/52"
90 mail_exit 90 mail_exit
91 91
92 # Now examine the created files 92 # Now examine the created files
93 93
94 mail_test_file "$MAIL_FOLDER_DIR/1" "Have some wine" 94 mu_test_file "$MU_FOLDER_DIR/1" "Have some wine"
95 mail_test_file "$MAIL_FOLDER_DIR/tmp" \ 95 mu_test_file "$MU_FOLDER_DIR/tmp" \
96 "I don't see any wine" \ 96 "I don't see any wine" \
97 "There isn't any" 97 "There isn't any"
98 mail_test_file "$MAIL_FOLDER_DIR/hare" \ 98 mu_test_file "$MU_FOLDER_DIR/hare" \
99 "Have some wine" \ 99 "Have some wine" \
100 "I don't see any wine" \ 100 "I don't see any wine" \
101 "There isn't any" 101 "There isn't any"
......