summaryrefslogtreecommitdiff
path: root/tests/libzebra.tests/teststream.exp
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2013-01-24 01:39:14 +0100
committerDavid Lamparter <equinox@diac24.net>2013-04-14 16:01:19 +0200
commitc69905b673812ce6ec2a12960727a27b9b8d6426 (patch)
tree2b7608b8d16bedfafbf734d5a0e8ff26646107f1 /tests/libzebra.tests/teststream.exp
parent5bb7e4d12b3a3015208fad5ee0f3c055b704c8c4 (diff)
tests: DejaGNU libzebra
Wrap the few libzebra test programs we have up for DejaGNU. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests/libzebra.tests/teststream.exp')
-rw-r--r--tests/libzebra.tests/teststream.exp28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/libzebra.tests/teststream.exp b/tests/libzebra.tests/teststream.exp
new file mode 100644
index 00000000..ca602e30
--- /dev/null
+++ b/tests/libzebra.tests/teststream.exp
@@ -0,0 +1,28 @@
+set timeout 10
+spawn "./teststream"
+
+expect {
+ "endp: 15, readable: 15, writeable: 1009" { }
+ eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
+expect {
+ "0xef 0xbe 0xef 0xde 0xad 0xbe 0xef 0xde 0xad 0xbe 0xef 0xde 0xad 0xbe 0xef" { }
+ eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
+expect {
+ "endp: 15, readable: 15, writeable: 0" { }
+ eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
+expect {
+ "0xef 0xbe 0xef 0xde 0xad 0xbe 0xef 0xde 0xad 0xbe 0xef 0xde 0xad 0xbe 0xef" { }
+ eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
+expect {
+ "c: 0xef" { }
+ eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
+expect {
+ "w: 0xbeef" { }
+ eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
+expect {
+ "l: 0xdeadbeef" { }
+ eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
+expect {
+ "q: 0xdeadbeefdeadbeef" { }
+ eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
+pass "teststream"