-# $Id: channel-test.e,v 1.3 2003/12/27 13:01:12 alex Exp $
+# ngIRCd test suite
+# Channel test
-spawn telnet localhost 6789
+spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
"323 nick :End of LIST"
}
-send "part #channel\r"
+send "part #channel :bye bye\r"
expect {
timeout { exit 1 }
- "@* PART #channel :nick"
+ "@* PART #channel :bye bye"
+}
+
+send "join #channel\r"
+expect {
+ timeout { exit 1 }
+ "@* JOIN :#channel"
+}
+expect {
+ timeout { exit 1 }
+ "366"
+}
+
+send "join #channel2\r"
+expect {
+ timeout { exit 1 }
+ "@* JOIN :#channel2"
+}
+expect {
+ timeout { exit 1 }
+ "366"
+}
+
+send "join 0\r"
+expect {
+ timeout { exit 1 }
+ "@* PART #channel2 :"
+}
+expect {
+ timeout { exit 1 }
+ "@* PART #channel :"
}
send "quit\r"
timeout { exit 1 }
"Connection closed"
}
-
-# -eof-