]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/testsuite/mode-test.e
Always cloak client hostname, if needed
[ngircd-alex.git] / src / testsuite / mode-test.e
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..260cd03c12898ae46c5e9d58b1f5f4fb4bcf74ff 100644 (file)
@@ -0,0 +1,108 @@
+# $Id: mode-test.e,v 1.7 2008/02/16 11:27:49 fw 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 }
+       "@* MODE nick :+i"
+}
+
+send "mode nick\r"
+expect {
+       timeout { exit 1 }
+       "221 nick +i"
+}
+
+send "mode nick -i\r"
+expect {
+       timeout { exit 1 }
+       "@* 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 }
+       "221 nick +o"
+}
+
+send "join #channel\r"
+expect {
+       timeout { exit 1 }
+       "@* JOIN :#channel"
+}
+expect {
+       timeout { exit 1 }
+       "366"
+}
+
+send "mode #channel +tn\r"
+expect {
+       timeout { exit 1 }
+       "@* 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 }
+       "@* MODE #channel +v nick\r"
+}
+
+send "mode #channel +I nick1\r"
+expect {
+       timeout { exit 1 }
+       "@* MODE #channel +I nick1!*@*"
+}
+
+send "mode #channel +b nick2@domain\r"
+expect {
+       timeout { exit 1 }
+       "@* MODE #channel +b nick2!*@domain"
+}
+
+send "mode #channel +I nick3!user\r"
+expect {
+       timeout { exit 1 }
+       "@* MODE #channel +I nick3!user@*"
+}
+
+send "mode #channel -vo nick nick\r"
+expect {
+       timeout { exit 1 }
+       "@* MODE #channel -vo nick nick\r"
+}
+
+send "quit\r"
+expect {
+       timeout { exit 1 }
+       "Connection closed"
+}
+
+# -eof-