about summary refs log tree commit diff
path: root/src/testsuite/whois-test.e
blob: 2aed6944f2ebd60dcfa1bc9ecdcb1535113603b6 (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
# ngIRCd test suite
# WHOIS test

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

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

send "whois nick\r"
expect {
	timeout { exit 1 }
	"311 nick nick ~user localhost* \* :Real Name\r"
}

send "whois *\r"
expect {
	timeout { exit 1 }
	"311 nick nick ~user localhost* \* :Real Name\r"
}

send "whois n*\r"
expect {
	timeout { exit 1 }
	"311 nick nick ~user localhost* \* :Real Name\r"
}

send "whois ?ick\r"
expect {
	timeout { exit 1 }
	"311 nick nick ~user localhost* \* :Real Name\r"
}

send "whois ????,n?*k\r"
expect {
	timeout { exit 1 }
	"311 nick nick ~user localhost* \* :Real Name\r"
}

send "quit\r"
expect {
	timeout { exit 1 }
	"ERROR"
}

# -eof-