home · contact · privacy
Change end-of-fragments marking in testing scripts to easen human and machine parsing.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 7 Nov 2025 20:56:17 +0000 (21:56 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 7 Nov 2025 20:56:17 +0000 (21:56 +0100)
src/ircplom/testing.py
src/tests/_timeout_retries.test
src/tests/connect_disconnect_legalities.test
src/tests/error_disconnects.test
src/tests/pingpong.test
src/tests/test.test
src/tests/tui_draw.test
src/tests/tui_line_formattings.test

index 4f56c187105ee7289edc682055f5ad8ff911bd9e..a09dcd60b90cbc071118af68d6535792c13b386f 100644 (file)
@@ -266,12 +266,13 @@ class _Playbook:
             fragments_cutoff = -1
             for idx, line_t in enumerate(self._lines_t[:] + [('', '')]):
                 if line_t[1].startswith(_MARK_FRAGMENT):
+                    assert _SEP_0 in line_t[1], (idx, line_t)
                     if anchor:
                         fragments[anchor] = tuple(fragment)
-                    if not line_t[1][len(_MARK_FRAGMENT):].rstrip():
+                    anchor = line_t[1].split(_SEP_0, maxsplit=1)[1]
+                    if anchor.startswith(_MARK_FRAGMENT):
                         fragments_cutoff = idx
                         break
-                    anchor = line_t[1].split(_SEP_0, maxsplit=1)[1]
                     fragment.clear()
                     continue
                 fragment += [line_t]
index cd2e24d48083215e01f7acef86203ba5d9aad8cf..d5cb167ca7fd39269b7f95004d3a06bb07cdb6d4 100644 (file)
@@ -60,7 +60,7 @@ log 1 > CAP LS :302
 log 1 > USER foobarbazquux 0 * :baz
 log 1 > NICK :foo
 
 ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 # NB: FakeIrcConnection on any port > 10000 will fail connecting with a timeout
 # the TestingClient meanwhile will decrement any port of that range by 1 after
index 68dadfa568132715066e09de7aedcae0e7ffc7a0..568a78cd3939e1eb863b5ca186e42d608b86e104 100644 (file)
@@ -26,7 +26,7 @@ log 2 $ DISCONNECTED
 servermsg 0 MSG
 log 1 < MSG
 
 ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 # to prepare, initiate connection
 > /connect foo.bar.baz foo bar:baz
index 7a0e11b84b79a2582d745ddc780fe66222493d87..f0d794a01e82716f3d952b9eff512cfdc05a34e1 100644 (file)
@@ -38,7 +38,7 @@ insert reconnect
 insert servermsglogged : +0 MSG ERROR :XXX
 log 1 $ connection_state set to: [XXX]
 
 ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 # to prepare first test, initiate connected state
 > /connect foo.bar.baz foo bar:baz
index 1c03b548f6f09aec674eeb66b7c221eb86f522fa..8f7c7c5d0ceee1ad78f68f056aaa6a3b6e2ff643 100644 (file)
@@ -41,7 +41,7 @@ log 1 $ will retry connecting in 1 seconds
 servermsg 0 timeout
 log 1 > PING :what's up?
 
 ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 > /connect foo.bar.baz foo:bar baz:foobarbazquux
 insert isupport-clear
index b8852f67b94e1821d92d147ffa4ccd316b91692d..5be974b0d7ad57189333a8021104c75dfd5b745e 100644 (file)
@@ -272,7 +272,7 @@ insert isupport-clear : +8
 log 8 $ connection_state set to: []
 log , $ DISCONNECTED
 
 ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 # on /connect init databases, log in new windows
 > /connect foo.bar.baz foo:bar baz:foobarbazquux
index 74686bf80130c6d6a3ab4609411ec17662ed5aab..ce7b38d4f1fdce7aed1b8759f93f0ba968f54967 100644 (file)
@@ -181,7 +181,7 @@ insert lines-ping-pong : +73 ?? 21
 insert lines-ping-pong : +75 ?? 22
 insert lines-ping-pong : +77 ?? 23
 
 ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 insert lines-empty
 insert lines-status-prompt-start : +22 X123456789X123456789X =================([0]
index 86b543ab6d26cd7de8c6dcf2a5c91926d7b0d363..27a93dba8503fe34c3310bf316d7bb714888a716 100644 (file)
@@ -2,7 +2,7 @@
 servermsg 0 MSG
 log 1 < MSG
 
 ×××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××
 
 > /connect foo.bar.baz foo bar:baz
 log 1 $ isupport cleared