-# $Id: channel-test.e,v 1.2 2002/09/09 21:26:00 alex Exp $
+# ngIRCd test suite
+# Channel test
spawn telnet localhost 6789
expect {
send "join #channel\r"
expect {
timeout { exit 1 }
- ":nick!~user@* JOIN :#channel"
+ "@* JOIN :#channel"
}
expect {
timeout { exit 1 }
send "topic #channel :Test-Topic\r"
expect {
timeout { exit 1 }
- ":nick!~user@* TOPIC #channel :Test-Topic"
+ "@* TOPIC #channel :Test-Topic"
}
send "who #channel\r"
expect {
timeout { exit 1 }
- "352 nick #channel ~user * nick H@ :0 User"
+ "352 nick #channel"
+}
+expect {
+ timeout { exit 1 }
+ "* nick H@ :0 User"
}
expect {
timeout { exit 1 }
send "part #channel\r"
expect {
timeout { exit 1 }
- ":nick!~user@* PART #channel :nick"
+ "@* PART #channel :nick"
+}
+
+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 :nick"
+}
+expect {
+ timeout { exit 1 }
+ "@* PART #channel :nick"
}
send "quit\r"
timeout { exit 1 }
"Connection closed"
}
-
-# -eof-