diff options
Diffstat (limited to 'tests/iid.cpp')
-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 */ |