Compare commits

...

4 Commits

Author SHA1 Message Date
Val Lorentz 34d0e0a46b Bump Sable 2024-05-04 13:13:04 +02:00
Val Lorentz 6bd7c72c32 Merge branch 'master' into who 2024-05-04 13:12:43 +02:00
Shivaram Lingamneni 723991c7ec
add test for RPL_NAMREPLY for secret channels (#265)
Ergo and ngIRCd were getting this wrong
2024-05-01 07:53:27 +02:00
Valentin Lorentz 1bc8741479 dashboard: Don't use <details> for tests with no docstring 2024-04-20 15:27:51 +02:00
4 changed files with 44 additions and 10 deletions

View File

@ -228,7 +228,7 @@ jobs:
uses: actions/checkout@v3
with:
path: ngircd
ref: 0714466af88d71d6c395629cd7fb624b099507d4
ref: 3e3f6cbeceefd9357b53b27c2386bb39306ab353
repository: ngircd/ngircd
- name: Build ngircd
run: |
@ -1106,7 +1106,7 @@ jobs:
uses: actions/checkout@v3
with:
path: sable
ref: fe337a036c3ab5f8548e2578b65568e628f4c32f
ref: b9deaa930c49f2939d9a584bedbfc3236da0d707
repository: Libera-Chat/sable
- name: Install rust toolchain
uses: actions-rs/toolchain@v1

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,39 @@ 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],
)
self.connectClient("nick2")
self.sendLine(2, "JOIN #chan")
namreplies = [msg for msg in self.getMessages(2) if msg.command == RPL_NAMREPLY]
self.assertNotEqual(len(namreplies), 0)
for msg in namreplies:
self.assertMessageMatch(
msg, command=RPL_NAMREPLY, params=["nick2", "@", "#chan", ANYSTR]
)
def _testNamesMultipleChannels(self, symbol):
self.connectClient("nick1")

View File

@ -230,7 +230,7 @@ software:
name: ngircd
repository: ngircd/ngircd
refs:
stable: 0714466af88d71d6c395629cd7fb624b099507d4 # two years ahead of rel-26.1
stable: 3e3f6cbeceefd9357b53b27c2386bb39306ab353 # three years ahead of rel-26.1
release: null
devel: master
devel_release: null
@ -249,7 +249,7 @@ software:
name: Sable
repository: Libera-Chat/sable
refs:
stable: fe337a036c3ab5f8548e2578b65568e628f4c32f
stable: b9deaa930c49f2939d9a584bedbfc3236da0d707
release: null
devel: master
devel_release: null