]> arthur.barton.de Git - ngircd-alex.git/blob - src/testsuite/channel-test.e
Implement RFC 2812 handling of "0" argument to JOIN
[ngircd-alex.git] / src / testsuite / channel-test.e
1 # $Id: channel-test.e,v 1.4 2008/02/05 13:31:51 fw Exp $
2
3 spawn telnet localhost 6789
4 expect {
5         timeout { exit 1 }
6         "Connected"
7 }
8
9 send "nick nick\r"
10 send "user user . . :User\r"
11 expect {
12         timeout { exit 1 }
13         "376"
14 }
15
16 send "join #channel\r"
17 expect {
18         timeout { exit 1 }
19         "@* JOIN :#channel"
20 }
21 expect {
22         timeout { exit 1 }
23         "366"
24 }
25
26 send "topic #channel :Test-Topic\r"
27 expect {
28         timeout { exit 1 }
29         "@* TOPIC #channel :Test-Topic"
30 }
31
32 send "who #channel\r"
33 expect {
34         timeout { exit 1 }
35         "352 nick #channel"
36 }
37 expect {
38         timeout { exit 1 }
39         "* nick H@ :0 User"
40 }
41 expect {
42         timeout { exit 1 }
43         "315 nick #channel"
44 }
45
46 send "names #channel\r"
47 expect {
48         timeout { exit 1 }
49         "353 nick = #channel :@nick"
50 }
51 expect {
52         timeout { exit 1 }
53         "366 nick #channel"
54 }
55
56 send "list\r"
57 expect {
58         timeout { exit 1 }
59         "322 nick #channel 1 :Test-Topic"
60 }
61 expect {
62         timeout { exit 1 }
63         "323 nick :End of LIST"
64 }
65
66 send "part #channel\r"
67 expect {
68         timeout { exit 1 }
69         "@* PART #channel :nick"
70 }
71
72 send "join #channel\r"
73 expect {
74         timeout { exit 1 }
75         "@* JOIN :#channel"
76 }
77 expect {
78         timeout { exit 1 }
79         "366"
80 }
81
82 send "join #channel2\r"
83 expect {
84         timeout { exit 1 }
85         "@* JOIN :#channel2"
86 }
87 expect {
88         timeout { exit 1 }
89         "366"
90 }
91
92 send "join 0\r"
93 expect {
94         timeout { exit 1 }
95         "@* PART #channel2 :nick"
96 }
97 expect {
98         timeout { exit 1 }
99         "@* PART #channel :nick"
100 }
101
102 send "quit\r"
103 expect {
104         timeout { exit 1 }
105         "Connection closed"
106 }
107
108 # -eof-