From d2bd952210adbfe2618637582f4df8a8ca710d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 16 Oct 2021 20:35:00 +0200 Subject: tests: protect IRC message with quotes in command /server fakerecv --- tests/unit/plugins/irc/test-irc-protocol.cpp | 2 +- tests/unit/plugins/irc/test-irc-server.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index 38dbd87a0..7fdeb037a 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -369,7 +369,7 @@ TEST_GROUP(IrcProtocolWithServer) snprintf (str_command, sizeof (str_command), "/command -buffer irc.server." IRC_FAKE_SERVER " irc " - "/server fakerecv %s", + "/server fakerecv \"%s\"", command); run_cmd_quiet (str_command); diff --git a/tests/unit/plugins/irc/test-irc-server.cpp b/tests/unit/plugins/irc/test-irc-server.cpp index e2a33e155..db7a12c24 100644 --- a/tests/unit/plugins/irc/test-irc-server.cpp +++ b/tests/unit/plugins/irc/test-irc-server.cpp @@ -1048,7 +1048,7 @@ TEST_GROUP(IrcServerConnected) snprintf (str_command, sizeof (str_command), "/command -buffer irc.server." IRC_FAKE_SERVER " irc " - "/server fakerecv %s", + "/server fakerecv \"%s\"", command); run_cmd_quiet (str_command); } -- cgit v1.2.3