channel-test.e 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # $Id: channel-test.e,v 1.3 2003/12/27 13:01:12 alex Exp $
  2. spawn telnet localhost 6789
  3. expect {
  4. timeout { exit 1 }
  5. "Connected"
  6. }
  7. send "nick nick\r"
  8. send "user user . . :User\r"
  9. expect {
  10. timeout { exit 1 }
  11. "376"
  12. }
  13. send "join #channel\r"
  14. expect {
  15. timeout { exit 1 }
  16. "@* JOIN :#channel"
  17. }
  18. expect {
  19. timeout { exit 1 }
  20. "366"
  21. }
  22. send "topic #channel :Test-Topic\r"
  23. expect {
  24. timeout { exit 1 }
  25. "@* TOPIC #channel :Test-Topic"
  26. }
  27. send "who #channel\r"
  28. expect {
  29. timeout { exit 1 }
  30. "352 nick #channel"
  31. }
  32. expect {
  33. timeout { exit 1 }
  34. "* nick H@ :0 User"
  35. }
  36. expect {
  37. timeout { exit 1 }
  38. "315 nick #channel"
  39. }
  40. send "names #channel\r"
  41. expect {
  42. timeout { exit 1 }
  43. "353 nick = #channel :@nick"
  44. }
  45. expect {
  46. timeout { exit 1 }
  47. "366 nick #channel"
  48. }
  49. send "list\r"
  50. expect {
  51. timeout { exit 1 }
  52. "322 nick #channel 1 :Test-Topic"
  53. }
  54. expect {
  55. timeout { exit 1 }
  56. "323 nick :End of LIST"
  57. }
  58. send "part #channel\r"
  59. expect {
  60. timeout { exit 1 }
  61. "@* PART #channel :nick"
  62. }
  63. send "quit\r"
  64. expect {
  65. timeout { exit 1 }
  66. "Connection closed"
  67. }
  68. # -eof-