home · contact · privacy
Extend tests, determine order of server caps listing.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 15 Sep 2025 13:49:22 +0000 (15:49 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 15 Sep 2025 13:49:22 +0000 (15:49 +0200)
ircplom/client.py
test.txt

index a5fe3e9377f6ddb9467fbf0c5bb12560c61a7547..236dff9f280c10ad71c67cc48fee9be8b4368c80 100644 (file)
@@ -701,7 +701,7 @@ class _CapsManager(_Clearable):
                     assert acks == self._list.intersection(acks)
                     assert set() == self._list.intersection(naks)
                     for key, data in [_Dict.key_val_from_eq_str(entry)
-                                      for entry in self._ls]:
+                                      for entry in sorted(self._ls)]:
                         self._dict[key].data = data
                         self._dict[key].enabled = key in self._list
                     return True
index fd273867deb4a2bc4b891f58fc6fcb0fd09c8ddd..af084a16f1cf087c575f135ca8862c8944a6d159 100644 (file)
--- a/test.txt
+++ b/test.txt
 1,2 $$$ *** Looking up your ident...
 2 < :*.?.net NOTICE * :*** Looking up your hostname...
 1,2 $$$ *** Looking up your hostname...
-2 < :*.?.net NOTICE * :*** Found your hostname (…) -- cached...
-1,2 $$$ *** Found your hostname (…) -- cached...
+2 < :*.?.net NOTICE * :*** Found your hostname (baz.bar.foo)
+1,2 $$$ *** Found your hostname (baz.bar.foo)
 2 < :*.?.net CAP * LS : foo bar sasl=PLAIN,EXTERNAL baz
 1,2 $ isupport cleared
 2 > CAP REQ :sasl
 2 > CAP :LIST
 2 < PING :?
 2 > PONG :?
+2 < :*.?.net CAP ? ACK :sasl
+2 < :*.?.net CAP ? LIST :cap-notify sasl
+1,2 $ caps:bar:data set to: []
+1,2 $ caps:baz:data set to: []
+1,2 $ caps:foo:data set to: []
+1,2 $ caps:sasl:data set to: []
+1,2 $ caps:sasl:data set to: [PLAIN,EXTERNAL]
+1,2 $ caps:sasl:enabled set to: [True]
+1,2 $ sasl_auth_state set to: [attempting]
+2 > AUTHENTICATE :PLAIN
+2 < AUTHENTICATE +
+2 > AUTHENTICATE :Zm9vAGZvbwBiYXI=
+2 < :foo.bar.baz 900 foo foo!plom@baz.bar.foo foo :You are now logged in as foo
+1,2 $ ?!plom@? renames foo
+1,2 $ users:me:host set to: [baz.bar.foo]
+1,2 $ sasl_account set to: [foo]
+2 < :foo.bar.baz 903 foo :SASL authentication successful
+1,2 $ sasl_auth_state set to: [SASL authentication successful]
+2 > CAP :END
 > /quit
 0 <