]> arthur.barton.de Git - ngircd-alex.git/blob - src/testsuite/message-test.e
Update error messages for user mode +b and channel Mode +M.
[ngircd-alex.git] / src / testsuite / message-test.e
1 spawn telnet localhost 6789
2 expect {
3         timeout { exit 1 }
4         "Connected"
5 }
6
7 send "nick nick\r"
8 send "user user . . :User\r"
9 expect {
10         timeout { exit 1 }
11         "376"
12 }
13
14 send "privmsg nick :test\r"
15 expect {
16         timeout { exit 1 }
17         "@* PRIVMSG nick :test"
18 }
19
20 send "privmsg nick\r"
21 expect {
22         timeout { exit 1 }
23         "412"
24 }
25
26 send "privmsg\r"
27 expect {
28         timeout { exit 1 }
29         "411"
30 }
31
32 send "privmsg nick,nick :test\r"
33 expect {
34         timeout { exit 1 }
35         "@* PRIVMSG nick :test\r*@* PRIVMSG nick :test"
36 }
37
38 send "privmsg Nick,#testChannel,nick :test\r"
39 expect {
40         timeout { exit 1 }
41         "@* PRIVMSG nick :test\r*401*@* PRIVMSG nick :test"
42 }
43
44 send "privmsg doesnotexist :test\r"
45 expect {
46         timeout { exit 1 }
47         "401"
48 }
49
50 send "privmsg ~UsEr@ngIRCd.Test.Server :test\r"
51 expect {
52         timeout { exit 1 }
53         "@* PRIVMSG nick :test"
54 }
55
56 send "mode nick +b\r"
57 expect {
58         timeout { exit 1 }
59         "MODE nick :+b"
60 }
61 send "privmsg nick :test\r"
62 expect {
63         timeout { exit 1 }
64         "486"
65 }
66 send "mode nick -b\r"
67 expect {
68         timeout { exit 1 }
69         "MODE nick :-b"
70 }
71
72 # The following two tests using "localhost" as host name
73 # had to be disabled, because there are operating systems
74 # out there, that use "localhost.<domain>" as host name
75 # for 127.0.0.1 instead of just "localhost".
76 # (for example OpenBSD 4, OpenSolaris, ...)
77 #
78 #send "privmsg ~user\%localhost :test\r"
79 #expect {
80 #       timeout { exit 1 }
81 #       "@* PRIVMSG nick :test"
82 #}
83 #
84 #send "privmsg Nick!~User@LocalHost :test\r"
85 #expect {
86 #       timeout { exit 1 }
87 #       "@* PRIVMSG nick :test"
88 #       "401"
89 #}
90
91 send "away :away\r"
92 expect {
93         timeout { exit 1 }
94         "306"
95 }
96
97 send "privmsg nick :test\r"
98 expect {
99         timeout { exit 1 }
100         "301"
101 }
102
103 send "away\r"
104 expect {
105         timeout { exit 1 }
106         "305"
107 }
108
109 send "privmsg \$ngircd.test.server :test\r"
110 expect {
111         timeout { exit 1 }
112         "481"
113 }
114
115 send "privmsg #*.de :test\r"
116 expect {
117         timeout { exit 1 }
118         "481"
119 }
120
121 send "oper TestOp 123\r"
122
123 send "privmsg \$ngircd.test.server :test\r"
124 expect {
125         timeout { exit 1 }
126         "@* PRIVMSG nick :test"
127 }
128
129 send "privmsg \$*.test*.server :test\r"
130 expect {
131         timeout { exit 1 }
132         "@* PRIVMSG nick :test"
133 }
134
135 send "privmsg \$noDotServer :test\r"
136 expect {
137         timeout { exit 1 }
138         "401"
139 }
140
141 #cannot test host mask since localhost has no '.' as RFC requires
142
143 send "quit\r"
144 expect {
145         timeout { exit 1 }
146         "Connection closed"
147 }
148
149 # -eof-