]> arthur.barton.de Git - ngircd-alex.git/blob - src/testsuite/message-test.e
Cleaned up PRIVMSG and NOTICE patches.
[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
57 send "privmsg ~user\%localhost :test\r"
58 expect {
59         timeout { exit 1 }
60         "@* PRIVMSG nick :test"
61 }
62
63 send "privmsg nick!~user@localhost :test\r"
64 expect {
65         timeout { exit 1 }
66         "@* PRIVMSG nick :test"
67 }
68
69 send "away :away\r"
70 expect {
71         timeout { exit 1 }
72         "306"
73 }
74
75 send "privmsg nick :test\r"
76 expect {
77         timeout { exit 1 }
78         "301"
79 }
80
81 send "away\r"
82 expect {
83         timeout { exit 1 }
84         "305"
85 }
86
87 send "privmsg \$ngircd.test.server :test\r"
88 expect {
89         timeout { exit 1 }
90         "481"
91 }
92
93 send "privmsg #*.de :test\r"
94 expect {
95         timeout { exit 1 }
96         "481"
97 }
98
99 send "oper TestOp 123\r"
100
101 send "privmsg \$ngircd.test.server :test\r"
102 expect {
103         timeout { exit 1 }
104         "@* PRIVMSG nick :test"
105 }
106
107 send "privmsg \$*.test*.server :test\r"
108 expect {
109         timeout { exit 1 }
110         "@* PRIVMSG nick :test"
111 }
112
113 send "privmsg \$noDotServer :test\r"
114 expect {
115         timeout { exit 1 }
116         "401"
117 }
118
119 #cannot test host mask since localhost has no '.' as RFC requires
120
121 send "quit\r"
122 expect {
123         timeout { exit 1 }
124         "Connection closed"
125 }
126
127 # -eof-