about summary refs log tree commit diff
path: root/src/testsuite/join-test.e
diff options
context:
space:
mode:
authorDana Dahlstrom <dana+ngIRCd@cs.ucsd.edu>2008-05-04 00:46:02 +0200
committerFlorian Westphal <fw@strlen.de>2008-05-05 16:12:41 +0200
commitc63d8fd051b9d1e9c8dfa64424b9f557968c4513 (patch)
treea0decc00b45b4450f8e10debe36818eb02b4b9c9 /src/testsuite/join-test.e
parent3d8eda9c860cbcbf195fe2242c67dd57fe966b3e (diff)
downloadngircd-c63d8fd051b9d1e9c8dfa64424b9f557968c4513.tar.gz
ngircd-c63d8fd051b9d1e9c8dfa64424b9f557968c4513.zip
tests for JOIN and various replies
Brandon Beresini sent me a patch yesterday adding tests for JOIN under
various circumstances, which I believe he worked on with Bryan Caldwell
and Ali Shemiran. I made a few modifications; the result is below.
Diffstat (limited to 'src/testsuite/join-test.e')
-rw-r--r--src/testsuite/join-test.e68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/testsuite/join-test.e b/src/testsuite/join-test.e
new file mode 100644
index 00000000..41a5168a
--- /dev/null
+++ b/src/testsuite/join-test.e
@@ -0,0 +1,68 @@
+spawn telnet localhost 6789
+expect {
+       timeout { exit 1 }
+       "Connected"
+}
+
+send "nick nick\r"
+send "user user . . :User\r"
+expect {
+       timeout { exit 1 }
+       "376"
+}
+
+send "JOIN\r"
+expect {
+       timeout { exit 1}
+       "461"
+}
+
+send "JOIN #InviteChannel\r"
+expect {
+       timeout { exit 1 }
+       "473"
+}
+
+send "JOIN #FullKeyed\r"
+expect {
+       timeout { exit 1 }
+       "475"
+}
+
+send "JOIN #FullKeyed WrongKey\r"
+expect {
+       timeout { exit 1 }
+       "475"
+}
+
+send "JOIN #FullKeyed Secret\r"
+expect {
+       timeout { exit 1 }
+       "471"
+}
+
+send "JOIN #TopicChannel\r"
+expect {
+       timeout { exit 1 }
+       "@* JOIN :#TopicChannel"
+}
+expect {
+       timeout { exit 1 }
+       "332"
+}
+
+send "JOIN 0\r"
+send "JOIN #1,#2,#3,#4\r"
+send "JOIN #5\r"
+expect {
+       timeout { exit 1 }
+       "405"
+}
+
+send "quit\r"
+expect {
+       timeout { exit 1 }
+       "Connection closed"
+}
+
+# -eof-