From c63d8fd051b9d1e9c8dfa64424b9f557968c4513 Mon Sep 17 00:00:00 2001 From: Dana Dahlstrom Date: Sun, 4 May 2008 00:46:02 +0200 Subject: 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. --- src/testsuite/join-test.e | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/testsuite/join-test.e (limited to 'src/testsuite/join-test.e') 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- -- cgit 1.4.1