summaryrefslogtreecommitdiff
path: root/testsuite/config/unix.exp
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/config/unix.exp')
-rw-r--r--testsuite/config/unix.exp33
1 files changed, 33 insertions, 0 deletions
diff --git a/testsuite/config/unix.exp b/testsuite/config/unix.exp
index 61a329e..4156c3b 100644
--- a/testsuite/config/unix.exp
+++ b/testsuite/config/unix.exp
@@ -52,6 +52,17 @@ proc expect_pass { testname reg } {
}
}
+proc expect_pipeproc_pass { testname reg } {
+ global pipeproc_spawnid
+
+ expect {
+ -i $pipeproc_spawnid
+ -re "$reg" { pass "$testname" }
+ default { fail "$testname" }
+ timeout { fail "$testname (timeout)" }
+ }
+}
+
proc expect_blank { testname } {
expect {
-re "\\w" { fail "$testname" }
@@ -60,6 +71,14 @@ proc expect_blank { testname } {
}
}
+proc expect_blank_continue { testname } {
+ expect {
+ -re "\\w" { fail "$testname" }
+ eof { }
+ timeout { pass "$testname (timeout)" }
+ }
+}
+
proc expect_table { test match_header match_items match_footer } {
expect {
-re "$match_header" {
@@ -117,6 +136,15 @@ proc expect_table_dsc { test match_header match_item } {
#}
}
+proc make_pipeproc { } {
+ global pipeproc_pid pipeproc_spawnid topdir
+
+ set testproc_realpath "${topdir}/lib/test_process"
+
+ set pipeproc_pid [ spawn $testproc_realpath ]
+ set pipeproc_spawnid $spawn_id
+
+}
proc make_testproc { } {
global testproc_path testproc_comm testproc_arg_str testproc1_pid testproc2_pid topdir
@@ -157,6 +185,11 @@ proc kill_testproc { } {
file delete $testproc_path
}
+proc kill_pipeproc { } {
+ global pipeproc_pid
+ kill_process $pipeproc_pid
+}
+
proc get_tty {} {
if { [catch { set raw_tty [ exec tty ] } msg]} {
warning "No TTY found"