From: Christian Heller Date: Mon, 3 Nov 2025 08:51:51 +0000 (+0100) Subject: Extend ERROR regex matching tests. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/%7B%7Bprefix%7D%7D/%7B%7Bdb.prefix%7D%7D/blog?a=commitdiff_plain;ds=sidebyside;p=ircplom Extend ERROR regex matching tests. --- diff --git a/src/tests/error_disconnects.test b/src/tests/error_disconnects.test index 290a345..ac3a63a 100644 --- a/src/tests/error_disconnects.test +++ b/src/tests/error_disconnects.test @@ -14,6 +14,12 @@ log 1 > NICK :foo insert isupport-clear : +1 log 1 $ connection_state set to: [] log , $ DISCONNECTED +× reconnect +> /reconnect +insert connecting : +1 +× disconnect-with-retry +insert disconnecting : +1 +log 1 $ will retry connecting in 1 seconds × # to prepare first test, initiate connected state @@ -36,13 +42,21 @@ loggedservermsg 0 1 < ERROR :abc def ghi log 1 $ connection_state set to: [abc def ghi] insert disconnecting : +1 -# to prepare next test, get back to connected state +# test ERROR regex (non-)matches > /window 1 -> /reconnect -insert connecting : +1 - -# test "timed out)" ERROR handling +insert reconnect : +1 +loggedservermsg 0 1 < ERROR :Closing link: (this should not match) +log 1 $ connection_state set to: [Closing link: (this should not match)] +insert disconnecting : +1 +insert reconnect : +1 loggedservermsg 0 1 < ERROR :Closing link: (Connection timed out) log 1 $ connection_state set to: [Closing link: (Connection timed out)] -insert disconnecting : +1 -log 1 $ will retry connecting in 1 seconds +insert disconnect-with-retry : +1 +insert reconnect : +1 +loggedservermsg 0 1 < ERROR :closing Link: (connection timed out) +log 1 $ connection_state set to: [closing Link: (connection timed out)] +insert disconnect-with-retry : +1 +insert reconnect : +1 +loggedservermsg 0 1 < ERROR :Closing link: (Ping timeout: 240 seconds) +log 1 $ connection_state set to: [Closing link: (Ping timeout: 240 seconds)] +insert disconnect-with-retry : +1