tests(iid): Explicitly set fixed_irc_server

These tests require that fixed_irc_server is set, and will fail if
another test sets them.

This may not have been a problem before, but since the catch2 update CI
has encountered issues running these tests randomly, as the order of
which tests are ran in is now random.
This commit is contained in:
Luca Matei Pintilie
2025-10-27 20:13:05 +01:00
parent 61242c35bc
commit e1ad60af4f
+3
View File
@@ -7,6 +7,7 @@
TEST_CASE("Irc user parsing")
{
Config::set("fixed_irc_server", "", false);
const std::map<char, char> prefixes{{'!', 'a'}, {'@', 'o'}};
IrcUser user1("!nick!~some@host.bla", prefixes);
CHECK(user1.nick == "nick");
@@ -23,6 +24,7 @@ TEST_CASE("Irc user parsing")
TEST_CASE("multi-prefix")
{
Config::set("fixed_irc_server", "", false);
const std::map<char, char> prefixes{{'!', 'a'}, {'@', 'o'}, {'~', 'f'}};
IrcUser user("!@~nick", prefixes);
CHECK(user.nick == "nick");
@@ -47,6 +49,7 @@ namespace Catch
TEST_CASE("Iid creation")
{
Config::set("fixed_irc_server", "", false);
const std::set<char> chantypes {'&', '#', '+', '!'};
Iid iid1("foo%irc.example.org", chantypes);
CHECK(std::to_string(iid1) == "foo%irc.example.org");