| 1 |
set test "char_and_line" |
| 2 |
if {! [installtest_p]} { untested "$test"; return } |
| 3 |
set send_human { .1 .3 1 .05 2 } |
| 4 |
|
| 5 |
catch { |
| 6 |
spawn stap $srcdir/$subdir/$test.stp |
| 7 |
expect |
| 8 |
|
| 9 |
send -raw "abcde" |
| 10 |
|
| 11 |
expect { |
| 12 |
"abcde" { pass "sub1" } |
| 13 |
timeout { fail "sub1" } |
| 14 |
} |
| 15 |
|
| 16 |
expect { |
| 17 |
-re .+ { fail "sub2" } |
| 18 |
timeout { pass "sub2" } |
| 19 |
} |
| 20 |
|
| 21 |
send -raw "\n" |
| 22 |
|
| 23 |
expect { |
| 24 |
"\r\nabcde\r\n" { pass "sub3" } |
| 25 |
timeout { fail "sub3" } |
| 26 |
} |
| 27 |
|
| 28 |
send -h -raw "01234\n56789\n" |
| 29 |
|
| 30 |
expect { |
| 31 |
"01234\r\n01234\r\n56789\r\n56789\r\n" { pass "sub4" } |
| 32 |
timeout { fail "sub4" } |
| 33 |
} |
| 34 |
} |
| 35 |
kill -INT -[exp_pid] 3 |
| 36 |
catch {close}; catch {wait} |