]> arthur.barton.de Git - ngircd-alex.git/commitdiff
- Tests erweitert.
authorAlexander Barton <alex@barton.de>
Mon, 9 Sep 2002 21:26:00 +0000 (21:26 +0000)
committerAlexander Barton <alex@barton.de>
Mon, 9 Sep 2002 21:26:00 +0000 (21:26 +0000)
src/testsuite/channel-test.e
src/testsuite/mode-test.e

index ce14613c5f46bcce34a689544c68d9a8153f6cc4..19bed8692d9b2af9292ec6cd1037042aae52358d 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: channel-test.e,v 1.1 2002/09/09 10:16:24 alex Exp $
+# $Id: channel-test.e,v 1.2 2002/09/09 21:26:00 alex Exp $
 
 spawn telnet localhost 6789
 expect {
@@ -23,6 +23,42 @@ expect {
        "366"
 }
 
+send "topic #channel :Test-Topic\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* TOPIC #channel :Test-Topic"
+}
+
+send "who #channel\r"
+expect {
+       timeout { exit 1 }
+       "352 nick #channel ~user * nick H@ :0 User"
+}
+expect {
+       timeout { exit 1 }
+       "315 nick #channel"
+}
+
+send "names #channel\r"
+expect {
+       timeout { exit 1 }
+       "353 nick = #channel :@nick"
+}
+expect {
+       timeout { exit 1 }
+       "366 nick #channel"
+}
+
+send "list\r"
+expect {
+       timeout { exit 1 }
+       "322 nick #channel 1 :Test-Topic"
+}
+expect {
+       timeout { exit 1 }
+       "323 nick :End of LIST"
+}
+
 send "part #channel\r"
 expect {
        timeout { exit 1 }
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8b07b5521f10510da948ea6f9fe2b37dff370f54 100644 (file)
@@ -0,0 +1,108 @@
+# $Id: mode-test.e,v 1.2 2002/09/09 21:26:00 alex Exp $
+
+spawn telnet localhost 6789
+expect {
+       timeout { exit 1 }
+       "Connected"
+}
+
+send "nick nick\r"
+send "user user . . :User\r"
+expect {
+       timeout { exit 1 }
+       "376"
+}
+
+send "mode nick +i\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* MODE nick +i"
+}
+
+send "mode nick\r"
+expect {
+       timeout { exit 1 }
+       "211 nick +i"
+}
+
+send "mode nick -i\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* MODE nick -i"
+}
+
+send "oper TestOp 123\r"
+expect {
+       timeout { exit 1 }
+       "MODE nick :+o"
+}
+expect {
+       timeout { exit 1 }
+       "381 nick"
+}
+
+send "mode nick\r"
+expect {
+       timeout { exit 1 }
+       "211 nick +o"
+}
+
+send "join #channel\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* JOIN :#channel"
+}
+expect {
+       timeout { exit 1 }
+       "366"
+}
+
+send "mode #channel +tn\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* MODE #channel +tn"
+}
+
+send "mode #channel\r"
+expect {
+       timeout { exit 1 }
+       "324 nick #channel +tn"
+}
+
+send "mode #channel +v nick\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* MODE #channel +v nick"
+}
+
+send "mode #channel +I nick1\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* MODE #channel +I nick1!*@*"
+}
+
+send "mode #channel +b nick2@domain\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* MODE #channel +b nick2!*@domain"
+}
+
+send "mode #channel +I nick3!user\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* MODE #channel +I nick3!user@*"
+}
+
+send "mode #channel -vo nick\r"
+expect {
+       timeout { exit 1 }
+       ":nick!~user@* MODE #channel -vo nick"
+}
+
+send "quit\r"
+expect {
+       timeout { exit 1 }
+       "Connection closed"
+}
+
+# -eof-