1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-05-17 14:44:10 +00:00
ngircd/src/testsuite/join-test.e
Dana Dahlstrom c63d8fd051 tests for JOIN and various replies
Brandon Beresini sent me a patch yesterday adding tests for JOIN under
various circumstances, which I believe he worked on with Bryan Caldwell
and Ali Shemiran. I made a few modifications; the result is below.
2008-05-05 16:12:41 +02:00

69 lines
917 B
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 "JOIN\r"
expect {
timeout { exit 1}
"461"
}
send "JOIN #InviteChannel\r"
expect {
timeout { exit 1 }
"473"
}
send "JOIN #FullKeyed\r"
expect {
timeout { exit 1 }
"475"
}
send "JOIN #FullKeyed WrongKey\r"
expect {
timeout { exit 1 }
"475"
}
send "JOIN #FullKeyed Secret\r"
expect {
timeout { exit 1 }
"471"
}
send "JOIN #TopicChannel\r"
expect {
timeout { exit 1 }
"@* JOIN :#TopicChannel"
}
expect {
timeout { exit 1 }
"332"
}
send "JOIN 0\r"
send "JOIN #1,#2,#3,#4\r"
send "JOIN #5\r"
expect {
timeout { exit 1 }
"405"
}
send "quit\r"
expect {
timeout { exit 1 }
"Connection closed"
}
# -eof-