X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=tests%2Fcommon%2Fircdecodertest.cpp;h=380a038f061424daeeb4e20ee953e2a2ad730d02;hb=c33c05dbcb7c0c9a51dc3d9d85334e2482d5e18e;hp=c32fd5e822d07f6ab3a88e72207bd7559bed4876;hpb=53e50ab66a5b3fa00282545ebc22ce3433ecf42b;p=quassel.git diff --git a/tests/common/ircdecodertest.cpp b/tests/common/ircdecodertest.cpp index c32fd5e8..380a038f 100644 --- a/tests/common/ircdecodertest.cpp +++ b/tests/common/ircdecodertest.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2019 by the Quassel Project * + * Copyright (C) 2005-2020 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)