diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-12-29 11:19:39 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2016-01-04 13:47:27 +0100 |
commit | a38b17692e0297cbd5d719f059bd0a1b6ef39fe4 (patch) | |
tree | 9780d21d143ac49baa3117bb12fff85922c3988d /tests | |
parent | dfcb0a6e0e975b7a4fd3b9ca3cb340fc1859d7f9 (diff) | |
download | biboumi-a38b17692e0297cbd5d719f059bd0a1b6ef39fe4.tar.gz biboumi-a38b17692e0297cbd5d719f059bd0a1b6ef39fe4.tar.bz2 biboumi-a38b17692e0297cbd5d719f059bd0a1b6ef39fe4.tar.xz biboumi-a38b17692e0297cbd5d719f059bd0a1b6ef39fe4.zip |
Support multi-prefix
See http://ircv3.net/specs/extensions/multi-prefix-3.1.html
ref #3103
Diffstat (limited to 'tests')
-rw-r--r-- | tests/iid.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/iid.cpp b/tests/iid.cpp index a90c208..74d010d 100644 --- a/tests/iid.cpp +++ b/tests/iid.cpp @@ -8,7 +8,6 @@ TEST_CASE("Irc user parsing") { const std::map<char, char> prefixes{{'!', 'a'}, {'@', 'o'}}; - IrcUser user1("!nick!~some@host.bla", prefixes); CHECK(user1.nick == "nick"); CHECK(user1.host == "~some@host.bla"); @@ -22,6 +21,15 @@ TEST_CASE("Irc user parsing") CHECK(user2.modes.find('a') == user2.modes.end()); } +TEST_CASE("multi-prefix") +{ + const std::map<char, char> prefixes{{'!', 'a'}, {'@', 'o'}, {'~', 'f'}}; + IrcUser user("!@~nick", prefixes); + CHECK(user.nick == "nick"); + CHECK(user.modes.size() == 3); + CHECK(user.modes.find('f') != user.modes.end()); +} + /** * Let Catch know how to display Iid objects */ |