]> arthur.barton.de Git - ngircd-alex.git/blob - src/testsuite/invite-test.e
cc7015a5e5dffe58e76598b42db81bd78071b537
[ngircd-alex.git] / src / testsuite / invite-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 "invite\r"
15 expect {
16         timeout { exit 1 }
17         "461"
18 }
19
20 send "invite nick\r"
21 expect {
22         timeout { exit 1 }
23         "461"
24 }
25
26 send "invite nick #channel\r"
27 expect {
28         timeout { exit 1 }
29         -re "INVITE nick :?#channel"
30 }
31 expect {
32         timeout { exit 1 }
33         -re "341 nick nick :?#channel"
34 }
35
36 send "invite nosuchnic #TopicChannel\r"
37 expect {
38         timeout { exit 1 }
39         "401 nick nosuchnic :No such nick or channel name"
40 }
41
42 send "invite nick #TopicChannel\r"
43 expect {
44         timeout { exit 1 }
45         "442 nick #TopicChannel :You are not on that channel"
46 }
47
48 send "join #channel\r"
49 expect {
50         timeout { exit 1 }
51         -re "JOIN :?#channel"
52 }
53
54 send "invite nick #channel\r"
55 expect {
56         timeout { exit 1 }
57         "443 nick nick #channel :is already on channel"
58 }
59
60 send "mode #channel +i\r"
61 expect {
62         timeout { exit 1 }
63         "MODE #channel +i"
64 }
65
66 send "mode #channel -o nick\r"
67 expect {
68         timeout { exit 1 }
69         "MODE #channel -o nick"
70 }
71
72 send "invite nick #channel\r"
73 expect {
74         timeout { exit 1 }
75         "482 nick #channel :You are not channel operator"
76         #it would be reasonable to expect 443 here instead
77 }
78
79 send "part #channel\r"
80 expect {
81         timeout { exit 1}
82         -re "PART #channel :?nick"
83 }
84
85 send "invite nick :parameter with spaces\r"
86 expect {
87         timeout { exit 1 }
88         "INVITE nick :parameter with spaces"
89 }
90 expect {
91         timeout { exit 1 }
92         "341 nick nick :parameter with spaces"
93 }
94
95 send "away message\r"
96 expect {
97         timeout { exit 1 }
98         "306 nick :You have been marked as being away"
99 }
100
101 send "INVITE nick #channel\r"
102 expect {
103         timeout { exit 1 }
104         -re "301 nick nick :?message"
105 }
106
107 send "quit\r"
108 expect {
109         timeout { exit 1 }
110         "Connection closed"
111 }
112
113 # -eof-