channel-test.e 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. # $Id: channel-test.e,v 1.4 2008/02/05 13:31:51 fw 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 "join #channel\r"
  64. expect {
  65. timeout { exit 1 }
  66. "@* JOIN :#channel"
  67. }
  68. expect {
  69. timeout { exit 1 }
  70. "366"
  71. }
  72. send "join #channel2\r"
  73. expect {
  74. timeout { exit 1 }
  75. "@* JOIN :#channel2"
  76. }
  77. expect {
  78. timeout { exit 1 }
  79. "366"
  80. }
  81. send "join 0\r"
  82. expect {
  83. timeout { exit 1 }
  84. "@* PART #channel2 :nick"
  85. }
  86. expect {
  87. timeout { exit 1 }
  88. "@* PART #channel :nick"
  89. }
  90. send "quit\r"
  91. expect {
  92. timeout { exit 1 }
  93. "Connection closed"
  94. }
  95. # -eof-