1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-05-08 02:04:07 +00:00
ngircd/src/testsuite/kick-test.e
Bryan Caldwell 3d8eda9c86 Allow KICK to handle comma-delimited lists (of channels, nicks).
includes test cases.

[fw@strlen.de:
	- move code around to avoid duplication
	- use const where possible
	- integrate test case]
2008-05-05 16:12:41 +02:00

113 lines
1.6 KiB
Plaintext

spawn telnet localhost 6789
expect {
timeout { exit 1 }
"Connected"
}
send "nick nick\r"
send "user user . . :User\r"
expect {
timeout { exit 1 }
"376"
}
send "kick #Channel nick\r"
expect {
timeout { exit 1 }
"403"
}
send "join #Channel\r"
send "kick #Channel nick\r"
expect {
timeout { exit 1 }
"@* KICK #Channel nick :nick"
}
send "join #Channel\r"
send "kick #Channel nick :reason\r"
expect {
timeout { exit 1 }
"@* KICK #Channel nick :reason"
}
send "join #Channel,#Channel2\r"
send "kick #Channel,#Channel2 nick\r"
expect {
timeout { exit 1 }
"461"
}
send "kick #Channel,#Channel2,#NoExists,#NoExists nick1,nick,nick3,nick :reason\r"
expect {
timeout { exit 1 }
"401"
}
expect {
timeout { exit 1 }
"@* KICK #Channel2 nick :reason"
}
expect {
timeout { exit 1 }
"401"
}
expect {
timeout { exit 1 }
"403"
}
send "kick #Channel nick2,nick,nick3\r"
expect {
timeout { exit 1 }
"401"
}
expect {
timeout { exit 1 }
"@* KICK #Channel nick :nick"
}
expect {
timeout { exit 1 }
"401"
}
send "kick #Channel ,,\r"
expect {
timeout { exit 1 }
"401"
}
expect {
timeout { exit 1 }
"401"
}
send "kick ,, ,,,\r"
expect {
timeout { exit 1 }
"461"
}
send "kick ,, ,,\r"
expect {
timeout { exit 1 }
"401"
}
expect {
timeout { exit 1 }
"401"
}
expect {
timeout { exit 1 }
"401"
}
send "quit\r"
expect {
timeout { exit 1 }
"Connection closed"
}
# -eof-