mirror of https://github.com/progval/irctest.git
Compare commits
4 Commits
df3ba285f8
...
fa0d243599
Author | SHA1 | Date | |
---|---|---|---|
Shivaram Lingamneni | fa0d243599 | ||
Valentin Lorentz | 1bc8741479 | ||
Shivaram Lingamneni | 926592f5ef | ||
Shivaram Lingamneni | ce3ad40298 |
|
@ -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,
|
||||
|
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue