mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Add clang-format configuration.
For now, it uses tabs like before, to make the diff easier to read/check. One of following commits will switch it to spaces.
This commit is contained in:
@@ -24,7 +24,7 @@ using ::testing::ElementsAre;
|
||||
using ::testing::MatchesRegex;
|
||||
|
||||
class QueryTest : public ::testing::Test {
|
||||
protected:
|
||||
protected:
|
||||
void SetUp() { CZNC::CreateInstance(); }
|
||||
void TearDown() { CZNC::DestroyInstance(); }
|
||||
};
|
||||
@@ -85,19 +85,28 @@ TEST_F(QueryTest, SendBuffer) {
|
||||
|
||||
client.Reset();
|
||||
query.SendBuffer(&client);
|
||||
EXPECT_THAT(client.vsLines, ElementsAre(MatchesRegex(R"(:sender PRIVMSG me :\[\d\d:\d\d:\d\d\] a message)"),
|
||||
MatchesRegex(R"(:sender NOTICE #znc :\[\d\d:\d\d:\d\d\] a notice)")));
|
||||
EXPECT_THAT(
|
||||
client.vsLines,
|
||||
ElementsAre(
|
||||
MatchesRegex(R"(:sender PRIVMSG me :\[\d\d:\d\d:\d\d\] a message)"),
|
||||
MatchesRegex(
|
||||
R"(:sender NOTICE #znc :\[\d\d:\d\d:\d\d\] a notice)")));
|
||||
|
||||
client.Reset();
|
||||
user.SetTimestampPrepend(false);
|
||||
query.SendBuffer(&client);
|
||||
EXPECT_THAT(client.vsLines, ElementsAre(":sender PRIVMSG me :a message", ":sender NOTICE #znc :a notice"));
|
||||
EXPECT_THAT(client.vsLines, ElementsAre(":sender PRIVMSG me :a message",
|
||||
":sender NOTICE #znc :a notice"));
|
||||
|
||||
client.Reset();
|
||||
user.SetTimestampAppend(true);
|
||||
query.SendBuffer(&client);
|
||||
EXPECT_THAT(client.vsLines, ElementsAre(MatchesRegex(R"(:sender PRIVMSG me :a message \[\d\d:\d\d:\d\d\])"),
|
||||
MatchesRegex(R"(:sender NOTICE #znc :a notice \[\d\d:\d\d:\d\d\])")));
|
||||
EXPECT_THAT(
|
||||
client.vsLines,
|
||||
ElementsAre(
|
||||
MatchesRegex(R"(:sender PRIVMSG me :a message \[\d\d:\d\d:\d\d\])"),
|
||||
MatchesRegex(
|
||||
R"(:sender NOTICE #znc :a notice \[\d\d:\d\d:\d\d\])")));
|
||||
|
||||
network.ClientDisconnected(&client);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user