X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftestsuite%2Fmessage-test.e;h=0e70640e2b6ca2abd444a19eedf34aed611d3d53;hb=6e4235443eb4dee0930a65e613c8bf5e00331f73;hp=000334649d53e07230e36cff0c7be7c0a2abdb3c;hpb=2546a13ad2949192eb70bf21e114ec60af287ee4;p=ngircd-alex.git diff --git a/src/testsuite/message-test.e b/src/testsuite/message-test.e index 00033464..0e70640e 100644 --- a/src/testsuite/message-test.e +++ b/src/testsuite/message-test.e @@ -1,4 +1,5 @@ -# $Id: mode-test.e,v 1.7 2008/02/16 11:27:49 fw Exp $ +# ngIRCd test suite +# PRIVMSG and NOTICE test spawn telnet localhost 6789 expect { @@ -37,20 +38,59 @@ expect { "@* PRIVMSG nick :test\r*@* PRIVMSG nick :test" } -send "privmsg nick,#testChannel,nick :test\r" +send "privmsg Nick,#testChannel,nick :test\r" expect { timeout { exit 1 } "@* PRIVMSG nick :test\r*401*@* PRIVMSG nick :test" } -send "JOIN #testChannel\r" - send "privmsg doesnotexist :test\r" expect { timeout { exit 1 } "401" } +send "privmsg ~UsEr@ngIRCd.Test.Server :test\r" +expect { + timeout { exit 1 } + "@* PRIVMSG nick :test" +} + +send "mode nick +b\r" +expect { + timeout { exit 1 } + "MODE nick :+b" +} +send "privmsg nick :test\r" +expect { + timeout { exit 1 } + "486" +} +send "mode nick -b\r" +expect { + timeout { exit 1 } + "MODE nick :-b" +} + +# The following two tests using "localhost" as host name +# had to be disabled, because there are operating systems +# out there, that use "localhost." as host name +# for 127.0.0.1 instead of just "localhost". +# (for example OpenBSD 4, OpenSolaris, ...) +# +#send "privmsg ~user\%localhost :test\r" +#expect { +# timeout { exit 1 } +# "@* PRIVMSG nick :test" +#} +# +#send "privmsg Nick!~User@LocalHost :test\r" +#expect { +# timeout { exit 1 } +# "@* PRIVMSG nick :test" +# "401" +#} + send "away :away\r" expect { timeout { exit 1 } @@ -101,12 +141,8 @@ expect { "401" } -#cannot test host mask since localhost has no '.' as RFC requires - send "quit\r" expect { timeout { exit 1 } "Connection closed" } - -# -eof-