mirror of
https://github.com/znc/znc.git
synced 2026-05-06 21:42:28 +02:00
Protect some parts of code from clang-format
This commit is contained in:
@@ -89,6 +89,7 @@ TEST_F(BufferTest, AddLine) {
|
||||
}
|
||||
|
||||
TEST_F(BufferTest, UpdateLine) {
|
||||
// clang-format off
|
||||
CBuffer buffer(50);
|
||||
|
||||
VCString lines = {
|
||||
@@ -129,4 +130,5 @@ TEST_F(BufferTest, UpdateLine) {
|
||||
|
||||
EXPECT_EQ(17u, buffer.UpdateExactLine(CMessage(":irc.server.com 005 nick FOO=bar :are supported by this server")));
|
||||
EXPECT_EQ(":irc.server.com 005 nick FOO=bar :are supported by this server", buffer.GetBufLine(16).GetFormat());
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ protected:
|
||||
};
|
||||
|
||||
TEST_F(ClientTest, Pass) {
|
||||
// clang-format off
|
||||
testPass("p@ss#w0rd", "", "", "", "p@ss#w0rd");
|
||||
testPass("user:p@ss#w0rd", "user", "", "", "p@ss#w0rd");
|
||||
testPass("user/net-work:p@ss#w0rd", "user", "", "net-work", "p@ss#w0rd");
|
||||
@@ -52,9 +53,11 @@ TEST_F(ClientTest, Pass) {
|
||||
testPass("user@znc.in/net-work:p@ss#w0rd", "user@znc.in", "", "net-work", "p@ss#w0rd");
|
||||
testPass("user@znc.in@identifier:p@ss#w0rd", "user@znc.in", "identifier", "", "p@ss#w0rd");
|
||||
testPass("user@znc.in@identifier/net-work:p@ss#w0rd", "user@znc.in", "identifier", "net-work", "p@ss#w0rd");
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
TEST_F(ClientTest, User) {
|
||||
// clang-format off
|
||||
testUser("user/net-work", "user", "", "net-work");
|
||||
testUser("user@identifier", "user", "identifier", "");
|
||||
testUser("user@identifier/net-work", "user", "identifier", "net-work");
|
||||
@@ -62,6 +65,7 @@ TEST_F(ClientTest, User) {
|
||||
testUser("user@znc.in/net-work", "user@znc.in", "", "net-work");
|
||||
testUser("user@znc.in@identifier", "user@znc.in", "identifier", "");
|
||||
testUser("user@znc.in@identifier/net-work", "user@znc.in", "identifier", "net-work");
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
TEST_F(ClientTest, AccountNotify) {
|
||||
|
||||
@@ -153,6 +153,7 @@ private:
|
||||
};
|
||||
|
||||
void WriteConfig(QString path) {
|
||||
// clang-format off
|
||||
Process p("./znc", QStringList() << "--debug" << "--datadir" << path << "--makeconf", true);
|
||||
p.ReadUntil("Listen on port");Z; p.Write("12345");
|
||||
p.ReadUntil("Listen using SSL");Z; p.Write();
|
||||
@@ -174,6 +175,7 @@ void WriteConfig(QString path) {
|
||||
p.ReadUntil("channels");Z; p.Write();
|
||||
p.ReadUntil("Launch ZNC now?");Z; p.Write("no");
|
||||
p.ShouldFinishItself();
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
TEST(Config, AlreadyExists) {
|
||||
|
||||
@@ -49,12 +49,14 @@ protected:
|
||||
};
|
||||
|
||||
TEST_F(EscapeTest, Test) {
|
||||
// clang-format off
|
||||
// input url html sql msgtag
|
||||
testString("abcdefg","abcdefg", "abcdefg", "abcdefg", "abcdefg");
|
||||
testString("\n\t\r", "%0A%09%0D", "\n\t\r", "\\n\\t\\r", "\\n\t\\r");
|
||||
testString("'\"", "%27%22", "'"", "\\'\\\"", "'\"");
|
||||
testString("&<>", "%26%3C%3E", "&<>", "&<>", "&<>");
|
||||
testString(" ;", "+%3B", " ;", " ;", "\\s\\:");
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
TEST(StringTest, Bool) {
|
||||
|
||||
Reference in New Issue
Block a user