diff options
| author | F. Jason Park | 2023-10-30 23:36:54 -0700 |
|---|---|---|
| committer | F. Jason Park | 2023-11-01 16:14:10 -0700 |
| commit | 11e42b405ca222a037b7b3d215ef5d14a97ab929 (patch) | |
| tree | c38293cbe572f955dd54a86f285eac6e642a4d15 /test | |
| parent | 32ed6e610f4a29a6adebc89a7b37d1b4beb54ec1 (diff) | |
| download | emacs-11e42b405ca222a037b7b3d215ef5d14a97ab929.tar.gz emacs-11e42b405ca222a037b7b3d215ef5d14a97ab929.zip | |
; Attempt to fix race in erc-buffer-display test
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--time-vals,
erc-fill-tests--current-time-value): Rename former to latter and
change type from function to natnum.
(erc-fill-tests--wrap-populate, erc-fill-wrap--merge,
erc-fill-wrap--merge-action): Use `erc-fill-tests--current-time-value'
instead of function `erc-fill-tests--time-vals'.
* test/lisp/erc/erc-scenarios-base-association.el
(erc-scenarios-common--base-association-multi-net): Extend timeout.
* test/lisp/erc/erc-scenarios-base-buffer-display.el
(erc-scenarios-base-buffer-display--reconnect-common): Move some
common assertions here from callers.
(erc-scenarios-base-buffer-display--defwin-recbury-intbuf,
erc-scenarios-base-buffer-display--count-reset-timeout):
Factor out a couple common assertions. Clarify some comments.
(erc-scenarios-base-buffer-display--defwino-recbury-intbuf):
Factor out a couple common assertions and clarify some comments.
Account for possible concurrency bug leading to intermittent
test failures.
* test/lisp/erc/erc-scenarios-base-misc-regressions.el
(erc-scenarios-base-gapless-connect,
erc-scenarios-base-channel-buffer-revival): Extend timeouts.
* test/lisp/erc/resources/dcc/chat/accept.eld: Extend timeout.
* test/lisp/erc/resources/base/reconnect/options-again.eld: Extend
timeouts.
* test/lisp/erc/resources/erc-d/erc-d.el (erc-d--m): Prevent possible
wrong-type error.
* test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld: Extend
timeouts.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--base-network-id-bouncer): Extend timeout.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/erc/erc-fill-tests.el | 10 | ||||
| -rw-r--r-- | test/lisp/erc/erc-scenarios-base-association.el | 2 | ||||
| -rw-r--r-- | test/lisp/erc/erc-scenarios-base-buffer-display.el | 104 | ||||
| -rw-r--r-- | test/lisp/erc/erc-scenarios-base-misc-regressions.el | 4 | ||||
| -rw-r--r-- | test/lisp/erc/resources/base/reconnect/options-again.eld | 4 | ||||
| -rw-r--r-- | test/lisp/erc/resources/dcc/chat/accept.eld | 2 | ||||
| -rw-r--r-- | test/lisp/erc/resources/erc-d/erc-d.el | 2 | ||||
| -rw-r--r-- | test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld | 2 | ||||
| -rw-r--r-- | test/lisp/erc/resources/erc-scenarios-common.el | 2 |
9 files changed, 73 insertions, 59 deletions
diff --git a/test/lisp/erc/erc-fill-tests.el b/test/lisp/erc/erc-fill-tests.el index 92424d1e556..8179cbda2cb 100644 --- a/test/lisp/erc/erc-fill-tests.el +++ b/test/lisp/erc/erc-fill-tests.el | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | (require 'erc-fill) | 27 | (require 'erc-fill) |
| 28 | 28 | ||
| 29 | (defvar erc-fill-tests--buffers nil) | 29 | (defvar erc-fill-tests--buffers nil) |
| 30 | (defvar erc-fill-tests--time-vals (lambda () 0)) | 30 | (defvar erc-fill-tests--current-time-value 0) |
| 31 | 31 | ||
| 32 | (defun erc-fill-tests--insert-privmsg (speaker &rest msg-parts) | 32 | (defun erc-fill-tests--insert-privmsg (speaker &rest msg-parts) |
| 33 | (declare (indent 1)) | 33 | (declare (indent 1)) |
| @@ -49,7 +49,7 @@ | |||
| 49 | extended-command-history | 49 | extended-command-history |
| 50 | erc-kill-channel-hook erc-kill-server-hook erc-kill-buffer-hook) | 50 | erc-kill-channel-hook erc-kill-server-hook erc-kill-buffer-hook) |
| 51 | (cl-letf (((symbol-function 'erc-stamp--current-time) | 51 | (cl-letf (((symbol-function 'erc-stamp--current-time) |
| 52 | (lambda () (funcall erc-fill-tests--time-vals))) | 52 | (lambda () erc-fill-tests--current-time-value)) |
| 53 | ((symbol-function 'erc-server-connect) | 53 | ((symbol-function 'erc-server-connect) |
| 54 | (lambda (&rest _) | 54 | (lambda (&rest _) |
| 55 | (setq erc-server-process | 55 | (setq erc-server-process |
| @@ -261,7 +261,7 @@ | |||
| 261 | ;; Set this here so that the first few messages are from 1970. | 261 | ;; Set this here so that the first few messages are from 1970. |
| 262 | ;; Following the current date stamp, the speaker isn't merged | 262 | ;; Following the current date stamp, the speaker isn't merged |
| 263 | ;; even though it's continued: "<bob> zero." | 263 | ;; even though it's continued: "<bob> zero." |
| 264 | (let ((erc-fill-tests--time-vals (lambda () 1680332400))) | 264 | (let ((erc-fill-tests--current-time-value 1680332400)) |
| 265 | (erc-fill-tests--insert-privmsg "bob" "zero.") | 265 | (erc-fill-tests--insert-privmsg "bob" "zero.") |
| 266 | (erc-fill-tests--insert-privmsg "alice" "one.") | 266 | (erc-fill-tests--insert-privmsg "alice" "one.") |
| 267 | (erc-fill-tests--insert-privmsg "alice" "two.") | 267 | (erc-fill-tests--insert-privmsg "alice" "two.") |
| @@ -297,8 +297,8 @@ | |||
| 297 | (erc-fill-tests--wrap-populate | 297 | (erc-fill-tests--wrap-populate |
| 298 | 298 | ||
| 299 | (lambda () | 299 | (lambda () |
| 300 | ;; Set this here so that the first few messages are from 1970 | 300 | ;; Allow prior messages to be from 1970. |
| 301 | (let ((erc-fill-tests--time-vals (lambda () 1680332400))) | 301 | (let ((erc-fill-tests--current-time-value 1680332400)) |
| 302 | (erc-fill-tests--insert-privmsg "bob" "zero.") | 302 | (erc-fill-tests--insert-privmsg "bob" "zero.") |
| 303 | (erc-fill-tests--insert-privmsg "bob" "0.5") | 303 | (erc-fill-tests--insert-privmsg "bob" "0.5") |
| 304 | 304 | ||
diff --git a/test/lisp/erc/erc-scenarios-base-association.el b/test/lisp/erc/erc-scenarios-base-association.el index a40a4cb7550..10abe14c43b 100644 --- a/test/lisp/erc/erc-scenarios-base-association.el +++ b/test/lisp/erc/erc-scenarios-base-association.el | |||
| @@ -78,7 +78,7 @@ | |||
| 78 | (with-current-buffer "#chan@foonet" | 78 | (with-current-buffer "#chan@foonet" |
| 79 | (funcall expect 3 "bob") | 79 | (funcall expect 3 "bob") |
| 80 | (funcall expect 3 "was created on") | 80 | (funcall expect 3 "was created on") |
| 81 | (funcall expect 3 "prosperous"))) | 81 | (funcall expect 10 "prosperous"))) |
| 82 | 82 | ||
| 83 | (ert-info ("All #chan@barnet output consumed") | 83 | (ert-info ("All #chan@barnet output consumed") |
| 84 | (with-current-buffer "#chan@barnet" | 84 | (with-current-buffer "#chan@barnet" |
diff --git a/test/lisp/erc/erc-scenarios-base-buffer-display.el b/test/lisp/erc/erc-scenarios-base-buffer-display.el index df292a8c113..6a80baeaaa9 100644 --- a/test/lisp/erc/erc-scenarios-base-buffer-display.el +++ b/test/lisp/erc/erc-scenarios-base-buffer-display.el | |||
| @@ -27,7 +27,10 @@ | |||
| 27 | (eval-when-compile (require 'erc-join)) | 27 | (eval-when-compile (require 'erc-join)) |
| 28 | 28 | ||
| 29 | ;; These first couple `erc-auto-reconnect-display' tests used to live | 29 | ;; These first couple `erc-auto-reconnect-display' tests used to live |
| 30 | ;; in erc-scenarios-base-reconnect but have since been renamed. | 30 | ;; in erc-scenarios-base-reconnect but have since been renamed. Note |
| 31 | ;; that these are somewhat difficult to reason about because the user | ||
| 32 | ;; joins a second channel after reconnecting, and the first is | ||
| 33 | ;; controlled by `autojoin'. | ||
| 31 | 34 | ||
| 32 | (defun erc-scenarios-base-buffer-display--reconnect-common | 35 | (defun erc-scenarios-base-buffer-display--reconnect-common |
| 33 | (assert-server assert-chan assert-rest) | 36 | (assert-server assert-chan assert-rest) |
| @@ -55,6 +58,7 @@ | |||
| 55 | (ert-info ("Wait for some output in channels") | 58 | (ert-info ("Wait for some output in channels") |
| 56 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#chan")) | 59 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#chan")) |
| 57 | (funcall assert-chan expect) | 60 | (funcall assert-chan expect) |
| 61 | (funcall expect 10 "welcome") | ||
| 58 | (funcall expect 10 "welcome"))) | 62 | (funcall expect 10 "welcome"))) |
| 59 | 63 | ||
| 60 | (ert-info ("Server buffer shows connection failed") | 64 | (ert-info ("Server buffer shows connection failed") |
| @@ -68,6 +72,10 @@ | |||
| 68 | (ert-info ("Wait for auto reconnect") | 72 | (ert-info ("Wait for auto reconnect") |
| 69 | (with-current-buffer "FooNet" (funcall expect 10 "still in debug mode"))) | 73 | (with-current-buffer "FooNet" (funcall expect 10 "still in debug mode"))) |
| 70 | 74 | ||
| 75 | (ert-info ("Lone window still shows messages buffer") | ||
| 76 | (should (eq (window-buffer) (messages-buffer))) | ||
| 77 | (should (frame-root-window-p (selected-window)))) | ||
| 78 | |||
| 71 | (funcall assert-rest expect) | 79 | (funcall assert-rest expect) |
| 72 | 80 | ||
| 73 | (ert-info ("Wait for activity to recommence in both channels") | 81 | (ert-info ("Wait for activity to recommence in both channels") |
| @@ -76,40 +84,50 @@ | |||
| 76 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#spam")) | 84 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#spam")) |
| 77 | (funcall expect 10 "her elves come here anon"))))) | 85 | (funcall expect 10 "her elves come here anon"))))) |
| 78 | 86 | ||
| 87 | ;; Interactively issuing a slash command resets the auto-reconnect | ||
| 88 | ;; count, making ERC ignore the option `erc-auto-reconnect-display' | ||
| 89 | ;; when next displaying a newly set up buffer. In the case of a | ||
| 90 | ;; /JOIN, the option `erc-interactive-display' takes precedence. | ||
| 79 | (ert-deftest erc-scenarios-base-buffer-display--defwin-recbury-intbuf () | 91 | (ert-deftest erc-scenarios-base-buffer-display--defwin-recbury-intbuf () |
| 80 | :tags '(:expensive-test) | 92 | :tags '(:expensive-test) |
| 81 | (should (eq erc-buffer-display 'bury)) | 93 | (should (eq erc-buffer-display 'bury)) |
| 82 | (should (eq erc-interactive-display 'window)) | 94 | (should (eq erc-interactive-display 'window)) |
| 83 | (should-not erc-auto-reconnect-display) | 95 | (should-not erc-auto-reconnect-display) |
| 84 | 96 | ||
| 85 | (let ((erc-buffer-display 'window) | 97 | (let ((erc-buffer-display 'window) ; defwin |
| 86 | (erc-interactive-display 'buffer) | 98 | (erc-interactive-display 'buffer) ; intbuf |
| 87 | (erc-auto-reconnect-display 'bury)) | 99 | (erc-auto-reconnect-display 'bury)) ; recbury |
| 88 | 100 | ||
| 89 | (erc-scenarios-base-buffer-display--reconnect-common | 101 | (erc-scenarios-base-buffer-display--reconnect-common |
| 90 | 102 | ||
| 91 | (lambda (_) | 103 | (lambda (_) |
| 92 | (should (eq (window-buffer) (current-buffer))) | 104 | (ert-info ("New server buffer appears in a selected split") |
| 93 | (should-not (frame-root-window-p (selected-window)))) | 105 | (should (eq (window-buffer) (current-buffer))) |
| 106 | (should-not (frame-root-window-p (selected-window))))) | ||
| 94 | 107 | ||
| 95 | (lambda (_) | 108 | (lambda (_) |
| 96 | (should (eq (window-buffer) (current-buffer))) | 109 | (ert-info ("New channel buffer appears in other window") |
| 97 | (should (equal (get-buffer "FooNet") (window-buffer (next-window))))) | 110 | (should (eq (window-buffer) (current-buffer))) ; selected |
| 111 | (should (equal (get-buffer "FooNet") (window-buffer (next-window)))))) | ||
| 112 | |||
| 113 | (lambda (expect) | ||
| 114 | ;; If we /JOIN #spam now, we'll cancel the auto-reconnect | ||
| 115 | ;; timer, and "#chan" may well pop up in a split before we can | ||
| 116 | ;; verify that the lone window displays #spam (a race, IOW). | ||
| 117 | (ert-info ("Autojoined channel #chan buried on JOIN") | ||
| 118 | (with-current-buffer "#chan" | ||
| 119 | (funcall expect 10 "You have joined channel #chan")) | ||
| 120 | (should (frame-root-window-p (selected-window))) | ||
| 121 | (should (eq (window-buffer) (messages-buffer)))) | ||
| 98 | 122 | ||
| 99 | (lambda (_) | ||
| 100 | (with-current-buffer "FooNet" | ||
| 101 | (should (eq (window-buffer) (messages-buffer))) | ||
| 102 | (should (frame-root-window-p (selected-window)))) | ||
| 103 | |||
| 104 | ;; A manual /JOIN command tells ERC we're done auto-reconnecting | ||
| 105 | (with-current-buffer "FooNet" (erc-scenarios-common-say "/JOIN #spam")) | 123 | (with-current-buffer "FooNet" (erc-scenarios-common-say "/JOIN #spam")) |
| 106 | 124 | ||
| 107 | (ert-info ("#spam ignores `erc-auto-reconnect-display'") | 125 | (ert-info ("A /JOIN ignores `erc-auto-reconnect-display'") |
| 108 | ;; Uses `erc-interactive-display' instead. | ||
| 109 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#spam")) | 126 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#spam")) |
| 110 | (should (eq (window-buffer) (get-buffer "#spam"))) | 127 | (should (eq (window-buffer) (get-buffer "#spam"))) |
| 111 | ;; Option `buffer' replaces entire window (no split) | 128 | ;; Option `erc-interactive-display' being `buffer' means |
| 112 | (erc-d-t-wait-for 5 (frame-root-window-p (selected-window))))))))) | 129 | ;; Emacs reuses the selected window (no split). |
| 130 | (should (frame-root-window-p (selected-window))))))))) | ||
| 113 | 131 | ||
| 114 | (ert-deftest erc-scenarios-base-buffer-display--defwino-recbury-intbuf () | 132 | (ert-deftest erc-scenarios-base-buffer-display--defwino-recbury-intbuf () |
| 115 | :tags '(:expensive-test) | 133 | :tags '(:expensive-test) |
| @@ -117,7 +135,7 @@ | |||
| 117 | (should (eq erc-interactive-display 'window)) | 135 | (should (eq erc-interactive-display 'window)) |
| 118 | (should-not erc-auto-reconnect-display) | 136 | (should-not erc-auto-reconnect-display) |
| 119 | 137 | ||
| 120 | (let ((erc-buffer-display 'window-noselect) | 138 | (let ((erc-buffer-display 'window-noselect) ; defwino |
| 121 | (erc-auto-reconnect-display 'bury) | 139 | (erc-auto-reconnect-display 'bury) |
| 122 | (erc-interactive-display 'buffer)) | 140 | (erc-interactive-display 'buffer)) |
| 123 | (erc-scenarios-base-buffer-display--reconnect-common | 141 | (erc-scenarios-base-buffer-display--reconnect-common |
| @@ -139,26 +157,24 @@ | |||
| 139 | (should (eq (current-buffer) (window-buffer (next-window))))) | 157 | (should (eq (current-buffer) (window-buffer (next-window))))) |
| 140 | 158 | ||
| 141 | (lambda (_) | 159 | (lambda (_) |
| 142 | (with-current-buffer "FooNet" | 160 | ;; A JOIN command sent from lisp code is "non-interactive" and |
| 143 | (should (eq (window-buffer) (messages-buffer))) | 161 | ;; doesn't reset the auto-reconnect count, so ERC treats the |
| 144 | (should (frame-root-window-p (selected-window)))) | 162 | ;; response as possibly server-initiated or otherwise the |
| 145 | 163 | ;; result of an autojoin and continues to favor | |
| 146 | ;; A non-interactive JOIN command doesn't signal that we're | 164 | ;; `erc-auto-reconnect-display'. |
| 147 | ;; done auto-reconnecting, and `erc-interactive-display' is | 165 | (ert-info ("Join chan non-interactively and open a /QUERY") |
| 148 | ;; ignored, so `erc-buffer-display' is again in charge (here, | ||
| 149 | ;; that means `window-noselect'). | ||
| 150 | (ert-info ("Join chan noninteractively and open a /QUERY") | ||
| 151 | (with-current-buffer "FooNet" | 166 | (with-current-buffer "FooNet" |
| 152 | (erc-cmd-JOIN "#spam") | 167 | (erc-cmd-JOIN "#spam") ; "non-interactive" according to ERC |
| 153 | ;; However this will reset the option. | 168 | (erc-scenarios-common-say "/QUERY bob") ; resets count |
| 154 | (erc-scenarios-common-say "/QUERY bob") | ||
| 155 | (should (eq (window-buffer) (get-buffer "bob"))) | 169 | (should (eq (window-buffer) (get-buffer "bob"))) |
| 156 | (should (frame-root-window-p (selected-window))))) | 170 | (should (frame-root-window-p (selected-window))))) |
| 157 | 171 | ||
| 172 | ;; The /QUERY above resets the count, and `erc-buffer-display' | ||
| 173 | ;; again decides how #spam is displayed. | ||
| 158 | (ert-info ("Newly joined chan ignores `erc-auto-reconnect-display'") | 174 | (ert-info ("Newly joined chan ignores `erc-auto-reconnect-display'") |
| 159 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#spam")) | 175 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#spam")) |
| 160 | (should (eq (window-buffer) (get-buffer "bob"))) | 176 | (should (eq (window-buffer) (get-buffer "bob"))) |
| 161 | (should-not (frame-root-window-p (selected-window))) | 177 | (should-not (frame-root-window-p (selected-window))) ; noselect |
| 162 | (should (eq (current-buffer) (window-buffer (next-window)))))))))) | 178 | (should (eq (current-buffer) (window-buffer (next-window)))))))))) |
| 163 | 179 | ||
| 164 | (ert-deftest erc-scenarios-base-buffer-display--count-reset-timeout () | 180 | (ert-deftest erc-scenarios-base-buffer-display--count-reset-timeout () |
| @@ -177,24 +193,22 @@ | |||
| 177 | 193 | ||
| 178 | (lambda (_) | 194 | (lambda (_) |
| 179 | (with-current-buffer "FooNet" | 195 | (with-current-buffer "FooNet" |
| 180 | (should erc--server-reconnect-display-timer) | 196 | (should erc--server-reconnect-display-timer)) |
| 181 | (should (eq (window-buffer) (messages-buffer))) | ||
| 182 | (should (frame-root-window-p (selected-window)))) | ||
| 183 | 197 | ||
| 184 | ;; A non-interactive JOIN command doesn't signal that we're | 198 | ;; A non-interactive JOIN command doesn't signal that we're |
| 185 | ;; done auto-reconnecting | 199 | ;; done auto-reconnecting. |
| 186 | (ert-info ("Join chan noninteractively") | 200 | (ert-info ("Join channel #spam non-interactively") |
| 187 | (with-current-buffer "FooNet" | 201 | (with-current-buffer "FooNet" |
| 188 | (erc-d-t-wait-for 1 (null erc--server-reconnect-display-timer)) | 202 | (erc-d-t-wait-for 1 (null erc--server-reconnect-display-timer)) |
| 189 | (erc-cmd-JOIN "#spam"))) | 203 | (erc-cmd-JOIN "#spam"))) ; not processed as a /JOIN |
| 190 | 204 | ||
| 191 | (ert-info ("Newly joined chan ignores `erc-auto-reconnect-display'") | 205 | (ert-info ("Option `erc-auto-reconnect-display' ignored w/o timer") |
| 192 | (with-current-buffer (erc-d-t-wait-for 10 (get-buffer "#spam")) | 206 | (should (eq (window-buffer) (messages-buffer))) |
| 193 | (should (eq (window-buffer) (messages-buffer))) | 207 | (erc-d-t-wait-for 10 (get-buffer "#spam")) |
| 194 | ;; If `erc-auto-reconnect-display-timeout' were left alone, this | 208 | ;; If `erc-auto-reconnect-display-timeout' were left alone, |
| 195 | ;; would be (frame-root-window-p #<window 1 on *scratch*>). | 209 | ;; this would be (frame-root-window-p #<window 1 on scratch*>). |
| 196 | (should-not (frame-root-window-p (selected-window))) | 210 | (should-not (frame-root-window-p (selected-window))) |
| 197 | (should (eq (current-buffer) (window-buffer (next-window)))))))))) | 211 | (should (eq (get-buffer "#spam") (window-buffer (next-window))))))))) |
| 198 | 212 | ||
| 199 | ;; This shows that the option `erc-interactive-display' overrides | 213 | ;; This shows that the option `erc-interactive-display' overrides |
| 200 | ;; `erc-join-buffer' during cold opens and interactive /JOINs. | 214 | ;; `erc-join-buffer' during cold opens and interactive /JOINs. |
diff --git a/test/lisp/erc/erc-scenarios-base-misc-regressions.el b/test/lisp/erc/erc-scenarios-base-misc-regressions.el index c1915d088a0..42d7653d3ec 100644 --- a/test/lisp/erc/erc-scenarios-base-misc-regressions.el +++ b/test/lisp/erc/erc-scenarios-base-misc-regressions.el | |||
| @@ -77,7 +77,7 @@ Originally from scenario rebuffed/gapless as explained in Bug#48598: | |||
| 77 | 77 | ||
| 78 | (with-current-buffer (erc-d-t-wait-for 20 (get-buffer "#bar")) | 78 | (with-current-buffer (erc-d-t-wait-for 20 (get-buffer "#bar")) |
| 79 | (funcall expect 10 "was created on") | 79 | (funcall expect 10 "was created on") |
| 80 | (funcall expect 2 "his second fit")) | 80 | (funcall expect 10 "his second fit")) |
| 81 | 81 | ||
| 82 | (with-current-buffer (erc-d-t-wait-for 20 (get-buffer "#foo")) | 82 | (with-current-buffer (erc-d-t-wait-for 20 (get-buffer "#foo")) |
| 83 | (funcall expect 10 "was created on") | 83 | (funcall expect 10 "was created on") |
| @@ -108,7 +108,7 @@ Originally from scenario rebuffed/gapless as explained in Bug#48598: | |||
| 108 | (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) | 108 | (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) |
| 109 | 109 | ||
| 110 | (ert-info ("Server buffer is unique and temp name is absent") | 110 | (ert-info ("Server buffer is unique and temp name is absent") |
| 111 | (erc-d-t-wait-for 1 (get-buffer "FooNet")) | 111 | (erc-d-t-wait-for 10 (get-buffer "FooNet")) |
| 112 | (should-not (erc-scenarios-common-buflist "127.0.0.1")) | 112 | (should-not (erc-scenarios-common-buflist "127.0.0.1")) |
| 113 | (with-current-buffer erc-server-buffer-foo | 113 | (with-current-buffer erc-server-buffer-foo |
| 114 | (erc-cmd-JOIN "#chan"))) | 114 | (erc-cmd-JOIN "#chan"))) |
diff --git a/test/lisp/erc/resources/base/reconnect/options-again.eld b/test/lisp/erc/resources/base/reconnect/options-again.eld index f1fcc439cc3..8a3264fda9c 100644 --- a/test/lisp/erc/resources/base/reconnect/options-again.eld +++ b/test/lisp/erc/resources/base/reconnect/options-again.eld | |||
| @@ -32,13 +32,13 @@ | |||
| 32 | (0 ":irc.foonet.org 353 tester = #spam :alice tester @bob") | 32 | (0 ":irc.foonet.org 353 tester = #spam :alice tester @bob") |
| 33 | (0 ":irc.foonet.org 366 tester #spam :End of NAMES list")) | 33 | (0 ":irc.foonet.org 366 tester #spam :End of NAMES list")) |
| 34 | 34 | ||
| 35 | ((~mode-chan 4 "MODE #chan") | 35 | ((~mode-chan 10 "MODE #chan") |
| 36 | (0 ":irc.foonet.org 324 tester #chan +nt") | 36 | (0 ":irc.foonet.org 324 tester #chan +nt") |
| 37 | (0 ":irc.foonet.org 329 tester #chan 1620104779") | 37 | (0 ":irc.foonet.org 329 tester #chan 1620104779") |
| 38 | (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: But, as it seems, did violence on herself.") | 38 | (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: But, as it seems, did violence on herself.") |
| 39 | (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Well, this is the forest of Arden.")) | 39 | (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Well, this is the forest of Arden.")) |
| 40 | 40 | ||
| 41 | ((mode-spam 4 "MODE #spam") | 41 | ((mode-spam 20 "MODE #spam") |
| 42 | (0 ":irc.foonet.org 324 tester #spam +nt") | 42 | (0 ":irc.foonet.org 324 tester #spam +nt") |
| 43 | (0 ":irc.foonet.org 329 tester #spam 1620104779") | 43 | (0 ":irc.foonet.org 329 tester #spam 1620104779") |
| 44 | (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #spam :alice: Signior Iachimo will not from it. Pray, let us follow 'em.") | 44 | (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #spam :alice: Signior Iachimo will not from it. Pray, let us follow 'em.") |
diff --git a/test/lisp/erc/resources/dcc/chat/accept.eld b/test/lisp/erc/resources/dcc/chat/accept.eld index a23e9580bcc..463f931d26f 100644 --- a/test/lisp/erc/resources/dcc/chat/accept.eld +++ b/test/lisp/erc/resources/dcc/chat/accept.eld | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | (0 ":irc.foonet.org 266 tester 4 4 :Current global users 4, max 4") | 17 | (0 ":irc.foonet.org 266 tester 4 4 :Current global users 4, max 4") |
| 18 | (0 ":irc.foonet.org 422 tester :MOTD File is missing")) | 18 | (0 ":irc.foonet.org 422 tester :MOTD File is missing")) |
| 19 | 19 | ||
| 20 | ((mode-user 1.2 "MODE tester +i") | 20 | ((mode-user 10 "MODE tester +i") |
| 21 | ;; No mode answer | 21 | ;; No mode answer |
| 22 | (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.") | 22 | (0 ":irc.foonet.org NOTICE tester :This server is in debug mode and is logging all user I/O. If you do not wish for everything you send to be readable by the server owner(s), please disconnect.") |
| 23 | (0.2 ":dummy!~u@34n9brushbpj2.irc PRIVMSG tester :\C-aDCC CHAT chat 2130706433 " port "\C-a")) | 23 | (0.2 ":dummy!~u@34n9brushbpj2.irc PRIVMSG tester :\C-aDCC CHAT chat 2130706433 " port "\C-a")) |
diff --git a/test/lisp/erc/resources/erc-d/erc-d.el b/test/lisp/erc/resources/erc-d/erc-d.el index f072c6b93b2..a87904e5830 100644 --- a/test/lisp/erc/resources/erc-d/erc-d.el +++ b/test/lisp/erc/resources/erc-d/erc-d.el | |||
| @@ -297,7 +297,7 @@ With int SKIP, advance past that many exchanges." | |||
| 297 | (when erc-d--m-debug | 297 | (when erc-d--m-debug |
| 298 | (setq format-string (concat (format-time-string "%s.%N: ") format-string))) | 298 | (setq format-string (concat (format-time-string "%s.%N: ") format-string))) |
| 299 | (let ((insertp (and process erc-d--in-process)) | 299 | (let ((insertp (and process erc-d--in-process)) |
| 300 | (buffer (process-buffer (process-get process :server)))) | 300 | (buffer (and process (process-buffer (process-get process :server))))) |
| 301 | (when (and insertp (buffer-live-p buffer)) | 301 | (when (and insertp (buffer-live-p buffer)) |
| 302 | (princ (concat (apply #'format format-string args) "\n") buffer)) | 302 | (princ (concat (apply #'format format-string args) "\n") buffer)) |
| 303 | (when (or erc-d--m-debug (not insertp)) | 303 | (when (or erc-d--m-debug (not insertp)) |
diff --git a/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld b/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld index e5532980644..2db750e49da 100644 --- a/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld +++ b/test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | (0. ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") | 17 | (0. ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") |
| 18 | (0. ":irc.foonet.org 422 tester :MOTD File is missing")) | 18 | (0. ":irc.foonet.org 422 tester :MOTD File is missing")) |
| 19 | 19 | ||
| 20 | ((mode-user 2 "MODE tester +i") | 20 | ((mode-user 4 "MODE tester +i") |
| 21 | (0. ":irc.foonet.org 221 tester +Zi") | 21 | (0. ":irc.foonet.org 221 tester +Zi") |
| 22 | (0. ":irc.foonet.org 306 tester :You have been marked as being away") | 22 | (0. ":irc.foonet.org 306 tester :You have been marked as being away") |
| 23 | (0 ":tester!~u@awyxgybtkx7uq.irc JOIN #chan") | 23 | (0 ":tester!~u@awyxgybtkx7uq.irc JOIN #chan") |
diff --git a/test/lisp/erc/resources/erc-scenarios-common.el b/test/lisp/erc/resources/erc-scenarios-common.el index 9e134e6932f..802ccaeedaa 100644 --- a/test/lisp/erc/resources/erc-scenarios-common.el +++ b/test/lisp/erc/resources/erc-scenarios-common.el | |||
| @@ -455,7 +455,7 @@ buffer-naming collisions involving bouncers in ERC." | |||
| 455 | :id foo-id)) | 455 | :id foo-id)) |
| 456 | (setq erc-server-process-foo erc-server-process) | 456 | (setq erc-server-process-foo erc-server-process) |
| 457 | (erc-scenarios-common-assert-initial-buf-name foo-id port) | 457 | (erc-scenarios-common-assert-initial-buf-name foo-id port) |
| 458 | (erc-d-t-wait-for 3 (eq (erc-network) 'foonet)) | 458 | (erc-d-t-wait-for 6 (eq (erc-network) 'foonet)) |
| 459 | (erc-d-t-wait-for 3 (string= (buffer-name) serv-buf-foo)) | 459 | (erc-d-t-wait-for 3 (string= (buffer-name) serv-buf-foo)) |
| 460 | (funcall expect 5 "foonet"))) | 460 | (funcall expect 5 "foonet"))) |
| 461 | 461 | ||