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
816bb944
...
816bb94466d15ce8b726deeea1d1b7050310bfef
authored
2002-08-28 12:03:04 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
(mu_exec): added -arg-list option.
1 parent
a11cb59d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
testsuite/lib/mailutils.exp
testsuite/lib/mailutils.exp
View file @
816bb94
...
...
@@ -116,7 +116,7 @@ proc mu_start {args} {
}
# mu_exec [-retcode N
]
[
-message S
][
-default
(
FAIL | XFAIL
)][
-arg S...
]
# [PATTERN...
]
# [
-pattern PATTERN-LIST
]
[
PATTERN...
]
#
# Executes $MU_TOOL and checks whether it returns with the given exit status
# and its output matches supplied PATTERN.
...
...
@@ -158,13 +158,26 @@ proc mu_exec {args} {
}
else
if
{
"
$opt
"
==
"-arg"
}
{
append sw
"
[
lindex
$args
[
expr
$i
+ 1
]]
"
incr i
}
else
if
{
"
$opt
"
==
"-arg-list"
}
{
incr i
set s
[
lindex
$args
$i
]
for
{
set
j 0
}
{
$j
<
[
llength
$s
]}
{
incr
j
}
{
append sw
"
[
lindex
$s
$j
]
"
}
}
else
if
{
"
$opt
"
==
"-pattern"
}
{
set pattern
[
lindex
$args
[
expr
$i
+ 1
]]
incr i
}
else
{
break
}
}
set args
[
lrange
$args
$i
end
]
if
[
info
exists pattern
]
{
set args
[
concat
$pattern
[
lrange
$args
$i
end
]]
}
else
{
set args
[
lrange
$args
$i
end
]
}
if
[
info
exists host_board
]
{
if
[
board_info
$host
_board exists top_srcdir
]
{
append sw
" --mail-spool
[
board_info
$host
_board top_srcdir
]
/mail/testsuite/spool"
...
...
@@ -528,7 +541,7 @@ proc mu_test { args } {
}
set result 0
for
{
set
i 0
}
{
$i
<
[
llength
$pattern
]}
{
incr
i
}
{
for
{
set
i 0
}
{
$
result
== 0 &&
$
i
<
[
llength
$pattern
]}
{
incr
i
}
{
set regexp 0
switch -regexp --
"
[
lindex
${pattern}
$i
]
"
{
^-re.*$
{
set regexp 1
;
incr i
}
...
...
@@ -578,6 +591,7 @@ proc mu_test { args } {
break
}
}
verbose
"RES:
$result
"
if
{
$result
== 0
}
{
mu_expect
$tmt
{
-re
"
\[
\t
]*
\r\n
"
{
}
...
...
Please
register
or
sign in
to post a comment