Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
lyskom-server-ceder-1616-generations-topgit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
fb7da64e
Commit
fb7da64e
authored
Jun 15, 2002
by
Per Cederqvist
Browse files
Options
Downloads
Patches
Plain Diff
(good_bad_expect): New proc.
parent
5d810b9b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/server/testsuite/config/unix.exp
+48
-0
48 additions, 0 deletions
src/server/testsuite/config/unix.exp
with
48 additions
and
0 deletions
src/server/testsuite/config/unix.exp
+
48
−
0
View file @
fb7da64e
...
@@ -204,6 +204,54 @@ proc simple_expect {regex {testname ""} {is_meta ""}} {
...
@@ -204,6 +204,54 @@ proc simple_expect {regex {testname ""} {is_meta ""}} {
unset test
unset test
}
}
proc good_bad_expect {good_regex bad_regex {xreason ""}} {
global test
global any
global nl
global line_leader
global meta_line_leader
global verbose
if { $verbose } {
puts -nonewline "."
flush stdout
}
set ll $line_leader
if {![regexp "^(\[=%\])(\[0-9\]*)(( )(..*))?$" "$good_regex" all first refno]} {
fail "$test (broken good regex)"
unset test
return
}
set bad_regex "[string range "$bad_regex" 0 0]$refno [string range "$bad_regex" 1 end]"
set test "looking for $good_regex (or $bad_regex)"
expect {
-re "^${ll}($good_regex)$nl" {
if {$xreason != ""} {
setup_xfail "*-*-*" "$xreason"
}
pass "$test (got $expect_out(1,string))"
}
-re "^$ll$bad_regex$nl" {
if {$xreason != ""} {
setup_xfail "*-*-*" "$xreason"
}
fail "$test (bad regex matches)"
}
-re "^${ll}(\[=%\]$refno $any*)$nl" {
fail "$test (unexpected reply $expect_out(1,string))"
}
timeout {fail "$test (timeout)"}
eof {fail "$test (eof)"; wait}
buffer_full {fail "$test (buffer_full)"}
}
unset test
}
proc extracting_expect {regex var grp} {
proc extracting_expect {regex var grp} {
global test
global test
global any
global any
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment