Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
2ca1dac4
...
2ca1dac4b144ac50f3966915347b1a0b3e0f0e05
authored
2002-07-03 15:46:50 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Be more stringent in testing.
1 parent
6a863e26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
4 deletions
mail/testsuite/lib/mail.exp
mail/testsuite/lib/mail.exp
View file @
2ca1dac
...
...
@@ -124,6 +124,7 @@ verbose "MAILRC is $srcdir/etc/mail.rc" 2
return 1
}
}
mail_send
"#
\n
"
return 0
}
...
...
@@ -153,6 +154,14 @@ proc mail_send { string } {
}
proc
mail_command
{
cmd
}
{
global mail_prompt
mail_expect 30
{
-re
"
\[\r\n\]
?
${mail_prompt}
$
"
{}
default
{
perror
"mail not initialized"
return 1
}
}
set res
[
mail_send
"
$cmd
\n
"
]
mail_expect 30
{
-ex
"
${cmd}
\r\n
"
{
}
...
...
@@ -208,6 +217,7 @@ proc mail_expect { args } {
}
}
}
global suppress_flag
;
global remote_suppress_flag
;
global verbose
...
...
@@ -220,10 +230,10 @@ proc mail_expect { args } {
}
}
verbose
"RUNNING remote_expect host
$gtimeout
$notransfer
"
2
verbose
"RUNNING remote_expect host
$gtimeout
$notransfer
$expcode
"
2
set code
[
catch
\
{
uplevel
remote_expect host
"
$gtimeout
$notransfer
"
$expcode
}
string
];
{
uplevel
remote_expect host
$gtimeout
$notransfer
$expcode
}
string
];
if
[
info
exists old_val
]
{
set remote_suppress_flag
$old
_val
;
}
else
{
...
...
@@ -296,9 +306,16 @@ proc default_mail_test { args } {
set result 0
for
{
set
i 0
}
{
$i
<
[
llength
$pattern
]}
{
incr
i
}
{
verbose
"i=
$i
, pat=
[
lindex
${pattern}
$i
]
"
2
set pat
[
lindex
${pattern}
$i
]
mail_expect
$tmt
{
-ex
"
[
lindex
${pattern}
$i
]
"
{
}
-ex
"
[
lindex
${pattern}
$i
]
\r\n
"
{
}
-ex
"
$pat
\r\n
"
{
if
{
$expect
_out
(
buffer
)
!=
$expect
_out
(
0,string
)
}
{
verbose
"Got
\"
$expect
_out(buffer)
\"
"
2
verbose
"instead of expected
\"
$pat
\\
r
\\
n
\"
"
2
set result 1
break
}
}
default
{
set result 1
break
...
...
Please
register
or
sign in
to post a comment