teststream.exp 1.0 KB

12345678910111213141516171819202122232425262728
  1. set timeout 10
  2. spawn "./teststream"
  3. expect {
  4. "endp: 15, readable: 15, writeable: 1009" { }
  5. eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
  6. expect {
  7. "0xef 0xbe 0xef 0xde 0xad 0xbe 0xef 0xde 0xad 0xbe 0xef 0xde 0xad 0xbe 0xef" { }
  8. eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
  9. expect {
  10. "endp: 15, readable: 15, writeable: 0" { }
  11. eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
  12. expect {
  13. "0xef 0xbe 0xef 0xde 0xad 0xbe 0xef 0xde 0xad 0xbe 0xef 0xde 0xad 0xbe 0xef" { }
  14. eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
  15. expect {
  16. "c: 0xef" { }
  17. eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
  18. expect {
  19. "w: 0xbeef" { }
  20. eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
  21. expect {
  22. "l: 0xdeadbeef" { }
  23. eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
  24. expect {
  25. "q: 0xdeadbeefdeadbeef" { }
  26. eof { fail "teststream"; exit; } timeout { fail "teststream"; exit; } }
  27. pass "teststream"