Fix STATUSMSG buffering

This commit is contained in:
J-P Nurmi committed 2015-09-21 15:41:20 +02:00
1 parent 565d04a8ef
commit 3cb2834cc5
4 files changed
+32 -6

No files matched your search

+13
View File
@@ -145,3 +145,16 @@ TEST_F(ClientTest, ExtendedJoin) {
m_pTestClient->PutClient(extmsg);
EXPECT_THAT(m_pTestClient->vsLines, ElementsAre(msg.ToString(), extmsg.ToString()));
}
TEST_F(ClientTest, StatusMsg) {
m_pTestSock->ReadLine(":irc.znc.in 001 me :Welcome to the Internet Relay Network me");
m_pTestSock->ReadLine(":irc.znc.in 005 me CHANTYPES=# PREFIX=(ov)@+ STATUSMSG=@+ :are supported by this server");
m_pTestUser->SetAutoClearChanBuffer(false);
m_pTestClient->ReadLine("PRIVMSG @#chan :hello ops");
EXPECT_EQ(1u, m_pTestChan->GetBuffer().Size());
m_pTestUser->SetTimestampPrepend(false);
EXPECT_EQ(":me PRIVMSG @#chan :hello ops", m_pTestChan->GetBuffer().GetLine(0, *m_pTestClient));
}