diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-16 16:52:17 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-17 21:28:31 +0200 |
commit | 3e1b621f525df1f37cb3ee989cfa58ff459fb7d1 (patch) | |
tree | 27436fb21fe2e6782ae594eeef7e6950bd8af07e /tests/unit/plugins/irc/test-irc-protocol.cpp | |
parent | 56cb9e50afe135050c3fba480b0306aaa5e399e0 (diff) | |
download | weechat-3e1b621f525df1f37cb3ee989cfa58ff459fb7d1.zip |
tests: add extra tests on notice message received with just a server address
Diffstat (limited to 'tests/unit/plugins/irc/test-irc-protocol.cpp')
-rw-r--r-- | tests/unit/plugins/irc/test-irc-protocol.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/unit/plugins/irc/test-irc-protocol.cpp b/tests/unit/plugins/irc/test-irc-protocol.cpp index 6d78a46ad..6a1dcb0b9 100644 --- a/tests/unit/plugins/irc/test-irc-protocol.cpp +++ b/tests/unit/plugins/irc/test-irc-protocol.cpp @@ -1378,14 +1378,24 @@ TEST(IrcProtocolWithServer, notice) /* notice from server */ RECV("NOTICE AUTH :*** Looking up your hostname..."); CHECK_SRV("-- *** Looking up your hostname..."); + RECV(":server.address NOTICE AUTH :*** Looking up your hostname..."); + CHECK_SRV("-- server.address: *** Looking up your hostname..."); + RECV(":server.address NOTICE * :*** Looking up your hostname..."); + CHECK_SRV("-- server.address: *** Looking up your hostname..."); /* notice to channel/user */ + RECV(":server.address NOTICE #test :a notice"); + CHECK_CHAN("-- Notice(server.address): a notice"); + RECV(":server.address NOTICE alice :a notice"); + CHECK_SRV("-- server.address: a notice"); RECV(":bob!user@host NOTICE #test :a notice"); CHECK_CHAN("-- Notice(bob): a notice"); RECV(":bob!user@host NOTICE alice :a notice"); CHECK_SRV("-- bob (user@host): a notice"); /* notice to ops of channel */ + RECV(":server.address NOTICE @#test :a notice"); + CHECK_CHAN("-- Notice:@(server.address): a notice"); RECV(":bob!user@host NOTICE @#test :a notice"); CHECK_CHAN("-- Notice:@(bob): a notice"); @@ -1394,6 +1404,14 @@ TEST(IrcProtocolWithServer, notice) CHECK_SRV("-- Notice -> alice: a notice"); /* notice with channel name at beginning */ + RECV(":server.address NOTICE alice :[#test] a notice"); + CHECK_CHAN("-- PvNotice(server.address): a notice"); + RECV(":server.address NOTICE alice :(#test) a notice"); + CHECK_CHAN("-- PvNotice(server.address): a notice"); + RECV(":server.address NOTICE alice :{#test} a notice"); + CHECK_CHAN("-- PvNotice(server.address): a notice"); + RECV(":server.address NOTICE alice :<#test> a notice"); + CHECK_CHAN("-- PvNotice(server.address): a notice"); RECV(":bob!user@host NOTICE alice :[#test] a notice"); CHECK_CHAN("-- PvNotice(bob): a notice"); RECV(":bob!user@host NOTICE alice :(#test) a notice"); |