Compare commits

...

4 Commits

Author SHA1 Message Date
Shivaram Lingamneni fa0d243599
Merge 926592f5ef into 1bc8741479 2024-04-25 19:24:35 -04:00
Valentin Lorentz 1bc8741479 dashboard: Don't use <details> for tests with no docstring 2024-04-20 15:27:51 +02:00
Shivaram Lingamneni 926592f5ef allow a trailing space on the nick list 2024-04-14 00:19:28 -04:00
Shivaram Lingamneni ce3ad40298 add test for RPL_NAMREPLY for secret channels 2024-04-13 22:10:34 -04:00
2 changed files with 31 additions and 6 deletions

View File

@ -245,16 +245,17 @@ def build_test_table(
# TODO: only hash test parameter
row_anchor = md5sum(row_anchor)
doc = docstring(
getattr(getattr(module, class_name), test_name.split("[")[0])
)
row = HTML.tr(
HTML.th(
HTML.details(
HTML.summary(HTML.a(test_name, href=f"#{row_anchor}")),
docstring(
getattr(
getattr(module, class_name), test_name.split("[")[0]
)
),
),
doc,
)
if doc
else HTML.a(test_name, href=f"#{row_anchor}"),
class_="test-name",
),
id=row_anchor,

View File

@ -68,6 +68,30 @@ class NamesTestCase(cases.BaseServerTestCase):
"""
self._testNames(symbol=True, allow_trailing_space=False)
@cases.mark_specifications("RFC2812", "Modern")
def testNames2812Secret(self):
"""The symbol sent for a secret channel is `@` instead of `=`:
https://datatracker.ietf.org/doc/html/rfc2812#section-3.2.5
https://modern.ircdocs.horse/#rplnamreply-353
"""
self.connectClient("nick1")
self.sendLine(1, "JOIN #chan")
# enable secret channel mode
self.sendLine(1, "MODE #chan +s")
self.getMessages(1)
self.sendLine(1, "NAMES #chan")
messages = self.getMessages(1)
self.assertMessageMatch(
messages[0],
command=RPL_NAMREPLY,
params=["nick1", "@", "#chan", StrRe("@nick1 ?")],
)
self.assertMessageMatch(
messages[1],
command=RPL_ENDOFNAMES,
params=["nick1", "#chan", ANYSTR],
)
def _testNamesMultipleChannels(self, symbol):
self.connectClient("nick1")