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
42d4fece
...
42d4fece15cdb99a7952a1889ebbe2628a518639
authored
2002-11-19 13:57:11 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Bugfix: always check for newline after matched pattern.
1 parent
ba257933
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
testsuite/lib/mailutils.exp
testsuite/lib/mailutils.exp
View file @
42d4fec
...
...
@@ -152,8 +152,9 @@ proc mu_exec {args} {
for
{
set
i 0
}
{
$i
<
[
llength
$args
]}
{
incr
i
}
{
set opt
[
lindex
$args
$i
]
if
{
"
$opt
"
==
"-retcode"
}
{
set retcode
[
lindex
$args
[
expr
$i
+ 1
]]
incr i
set retcode
[
lindex
$args
$i
]
verbose
"RETCODE
$retcode
"
1
}
else
if
{
"
$opt
"
==
"-message"
}
{
set message
[
lindex
$args
[
expr
$i
+ 1
]]
incr i
...
...
@@ -197,7 +198,7 @@ proc mu_exec {args} {
set res
[
remote_exec host
$cmd
]
set args
[
concat
$args
"
$retcode
"
]
lappend args
"
$retcode
"
set output
[
lindex
$res
1
]
...
...
@@ -226,7 +227,7 @@ proc mu_exec {args} {
if
{
$regexp
}
{
verbose
"does
\"
$output
\"
match regular expression
\"
$pattern
\"
?"
1
if
{
!
[
regexp
--
"
$
pattern
(.*)"
"
$output
"
dummy output
]}
{
if
{
!
[
regexp
--
"
$
{pattern}
(.*)"
"
$output
"
dummy output
]}
{
set result 1
}
}
else
{
...
...
@@ -237,9 +238,10 @@ proc mu_exec {args} {
}
set output
[
string
range
$output
[
string
length
$pattern
]
end
]
}
if
{
!
[
regexp
--
"
\[
\t
]*
\r\n
(.*)"
"
$output
"
dummy output
]}
{
set result 1
}
}
if
{
!
[
regexp
--
"
\[
\t
]*
\r\n
(.*)"
"
$output
"
dummy output
]}
{
set result 1
}
if
{
$result
}
{
...
...
Please
register
or
sign in
to post a comment