summaryrefslogtreecommitdiff
path: root/tests/libzebra.tests/testcommands.exp
blob: f760c6d7f5e68642b49022cbb1bec635a5bbd970 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
set timeout 30
set test_name "testcommands"

spawn sh -c "./testcommands -e 0 < testcommands.in | diff -au - testcommands.out"

expect {
	eof {
	}
	timeout {
		exp_close
		fail "$test_name: timeout"
	}
}

catch wait result
set os_error    [lindex $result 2]
set exit_status [lindex $result 3]

if { $os_error == 0 && $exit_status == 0 } {
	pass "$test_name"
} else {
	fail "$test_name"
}