Blob


1 # $Id: check-idle.e,v 1.2 2004/09/04 14:22:13 alex Exp $
3 spawn telnet localhost 6789
4 expect {
5 timeout { exit 1 }
6 "Connected"
7 }
9 send "nick IdleTest\r"
10 send "user idle . . :Idle-Test\r"
11 expect {
12 timeout { exit 1 }
13 "433 * IdleTest :Nickname already in use" { exit 99 }
14 "376"
15 }
17 send "lusers\r"
18 expect {
19 timeout { exit 1 }
20 "251 IdleTest :There are 1 users and 0 services on 1 servers" { set r 0 }
21 "251 IdleTest :There are" { set r 99 }
22 }
24 send "quit\r"
25 expect {
26 timeout { exit 1 }
27 "Connection closed"
28 }
30 exit $r
32 # -eof-