X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=tests%2Fcommon%2Fircdecodertest.cpp;h=b1b227f14752d34b48c4b4808e4135df5d2b34d1;hb=24c7de34254b5de4cf28045a6923a527e06f7290;hp=093633666df1922159a92804732cab29283b0532;hpb=a95ad2de573027f9bee36db972bcae4195168d0c;p=quassel.git diff --git a/tests/common/ircdecodertest.cpp b/tests/common/ircdecodertest.cpp index 09363366..b1b227f1 100644 --- a/tests/common/ircdecodertest.cpp +++ b/tests/common/ircdecodertest.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2020 by the Quassel Project * + * Copyright (C) 2005-2022 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -150,6 +150,30 @@ TEST(IrcDecoderTest, with_tags) {IrcTagKey("rt"), "ql7"}}, "", "foo")); + + EXPECT_EQ(parse("@a=b foo"), + IrcMessage( + {{IrcTagKey("a"), "b"}}, + "", + "foo")); + + EXPECT_EQ(parse("@example.com/a=b foo"), + IrcMessage( + {{IrcTagKey("example.com", "a"), "b"}}, + "", + "foo")); + + EXPECT_EQ(parse("@example.com/subfolder/to/a=b foo"), + IrcMessage( + {{IrcTagKey("example.com/subfolder/to", "a"), "b"}}, + "", + "foo")); + + EXPECT_EQ(parse("@v\\/e\\/n\\/d\\/o\\/r/tag=b foo"), + IrcMessage( + {{IrcTagKey("v\\/e\\/n\\/d\\/o\\/r", "tag"), "b"}}, + "", + "foo")); } TEST(IrcDecoderTest, with_escaped_tags)