Commit 729da472 authored by Per Cederqvist's avatar Per Cederqvist

(extracting_expect): New proc.

parent 95d4df4b
......@@ -123,6 +123,28 @@ proc simple_expect {regex {testname ""} {is_meta ""}} {
unset test
}
proc extracting_expect {regex var grp} {
global test
global any
global nl
global line_leader
global $var
set test "looking for $regex"
expect {
-re "^$line_leader$regex$nl" {
set $var $expect_out($grp,string)
pass "$test"
}
timeout {fail "$test (timeout)"}
eof {fail "$test (eof)"; wait}
buffer_full {fail "$test (buffer_full)"}
}
unset test
}
proc unanchored_expect {regex testname} {
global test
global any
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment