Skip to content

Commit d9ad638

Browse files
authored
Add regression test for Insp's labeled nick bug (#242)
* Add regression test for Insp's labeled nick bug * Exclude test from irc2 and ircu2 as they error on CAP REQ
1 parent 246a259 commit d9ad638

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

irctest/controllers/inspircd.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def installed_version() -> int:
104104

105105
class InspircdController(BaseServerController, DirectoryBasedController):
106106
software_name = "InspIRCd"
107+
software_version = installed_version()
107108
supported_sasl_mechanisms = {"PLAIN"}
108109
supports_sts = False
109110
extban_mute_char = "m"

irctest/server_tests/regressions.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,27 @@ def testNickReleaseUnregistered(self):
197197
self.sendLine(2, "USER u s e r")
198198
reply = self.getRegistrationMessage(2)
199199
self.assertMessageMatch(reply, command=RPL_WELCOME)
200+
201+
@cases.mark_specifications("IRCv3")
202+
def testLabeledNick(self):
203+
"""
204+
InspIRCd up to 3.16.1 used the new nick as source of NICK changes
205+
206+
https://github.com/inspircd/inspircd/issues/2067
207+
208+
https://github.com/inspircd/inspircd/commit/83f01b36a11734fd91a4e7aad99c15463858fe4a
209+
"""
210+
self.connectClient(
211+
"alice",
212+
capabilities=["batch", "labeled-response"],
213+
skip_if_cap_nak=True,
214+
)
215+
216+
self.sendLine(1, "@label=abc NICK alice2")
217+
self.assertMessageMatch(
218+
self.getMessage(1),
219+
nick="alice",
220+
command="NICK",
221+
params=["alice2"],
222+
tags={"label": "abc", **ANYDICT},
223+
)

0 commit comments

Comments
 (0)