2014-04-17 23:55:49 +02:00
|
|
|
# ngIRCd test suite
|
|
|
|
# Idle test
|
2002-09-10 00:56:07 +02:00
|
|
|
|
2014-04-17 23:57:38 +02:00
|
|
|
spawn telnet 127.0.0.1 6789
|
2002-09-10 00:56:07 +02:00
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"Connected"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "nick IdleTest\r"
|
|
|
|
send "user idle . . :Idle-Test\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
2004-09-04 16:22:13 +02:00
|
|
|
"433 * IdleTest :Nickname already in use" { exit 99 }
|
2002-09-10 00:56:07 +02:00
|
|
|
"376"
|
|
|
|
}
|
|
|
|
|
|
|
|
send "lusers\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"251 IdleTest :There are 1 users and 0 services on 1 servers" { set r 0 }
|
|
|
|
"251 IdleTest :There are" { set r 99 }
|
|
|
|
}
|
|
|
|
|
|
|
|
send "quit\r"
|
|
|
|
expect {
|
|
|
|
timeout { exit 1 }
|
|
|
|
"Connection closed"
|
|
|
|
}
|
|
|
|
|
|
|
|
exit $r
|