blob: 2de93b0b547fe9ec8d40330a22e07420431429ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
proc runtest_exit_code { test_name command_line exit_code } {
spawn $command_line
expect eof
lassign [wait] pid spawnid os_error_flag value
if {$os_error_flag == 0} {
if {$value == $exit_code} {
pass "$test_name: Returned expected value $value"
} else {
fail "$test_name: Returned bad value $value, expected: $exit_code"
}
} else {
fail "$test_name: errno: $value"
}
}
|