Commit 46946de9 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(kill_client): Look for stray output before killing the client.

parent 4db2f6e3
......@@ -927,6 +927,41 @@ proc kill_client {nr} {
global client_id
global expect_always
global expect_active
global timeout
global line_leader
global test
global any
global nl
set old_timeout $timeout
set timeout 0
talk_to client $nr
set test "looking for stray output before client kill"
set ok 0
expect {
-re "^${line_leader}($any*)$nl" {
fail "$test (got $expect_out(1,string))"
set ok 0
-re "^${line_leader}($any*)" {
fail "$test (got $expect_out(1,string)) (no end-of-line)"
set ok 0
-re "($any$any*)" {
fail "$test (got $expect_out(1,string)) (bad line-leader)"
set ok 0
timeout {
if {$ok} {
pass "$test"
unset test
set timeout $old_timeout
close -i $client_id($nr)
wait -i $client_id($nr)
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