about summary refs log tree commit diff
path: root/src/testsuite/channel-test.e
blob: 19bed8692d9b2af9292ec6cd1037042aae52358d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# $Id: channel-test.e,v 1.2 2002/09/09 21:26:00 alex Exp $

spawn telnet localhost 6789
expect {
	timeout { exit 1 }
	"Connected"
}

send "nick nick\r"
send "user user . . :User\r"
expect {
	timeout { exit 1 }
	"376"
}

send "join #channel\r"
expect {
	timeout { exit 1 }
	":nick!~user@* JOIN :#channel"
}
expect {
	timeout { exit 1 }
	"366"
}

send "topic #channel :Test-Topic\r"
expect {
	timeout { exit 1 }
	":nick!~user@* TOPIC #channel :Test-Topic"
}

send "who #channel\r"
expect {
	timeout { exit 1 }
	"352 nick #channel ~user * nick H@ :0 User"
}
expect {
	timeout { exit 1 }
	"315 nick #channel"
}

send "names #channel\r"
expect {
	timeout { exit 1 }
	"353 nick = #channel :@nick"
}
expect {
	timeout { exit 1 }
	"366 nick #channel"
}

send "list\r"
expect {
	timeout { exit 1 }
	"322 nick #channel 1 :Test-Topic"
}
expect {
	timeout { exit 1 }
	"323 nick :End of LIST"
}

send "part #channel\r"
expect {
	timeout { exit 1 }
	":nick!~user@* PART #channel :nick"
}

send "quit\r"
expect {
	timeout { exit 1 }
	"Connection closed"
}

# -eof-