; Allow alternate ert-info text in ERC test utility
* test/lisp/erc/erc-tests.el (erc-tests--assert-printed-in-subprocess): Don't insist that arguments to the Emacs "-load" invocation option be actual disk files. * test/lisp/erc/resources/erc-d/erc-d-t.el (erc-d-t--wait-message-prefix, erc-d-t-wait-for, erc-d-t-ensure-for): Add and use new variable to make `ert-info' message prefix adjustable. The immediate use for this is to make it easier to distinguish between consecutive assertions in which the first waits for a condition and the second ensures it holds for some duration. * test/lisp/erc/resources/erc-d/erc-d-u.el (erc-d-u--read-exchange-default): Skip killed buffers. * test/lisp/erc/resources/erc-d/erc-d.el: Typo. * test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld: Timeouts. * test/lisp/erc/resources/base/assoc/bouncer-history/foonet.eld: Timeouts. * test/lisp/erc/resources/base/assoc/bumped/again.eld: Timeouts. * test/lisp/erc/resources/base/assoc/bumped/foisted.eld: Timeouts. * test/lisp/erc/resources/base/assoc/bumped/refoisted.eld: Timeouts. * test/lisp/erc/resources/base/flood/soju.eld: Timeouts. * test/lisp/erc/resources/base/netid/bouncer/barnet.eld: Timeouts. * test/lisp/erc/resources/base/netid/bouncer/foonet.eld: Timeouts. * test/lisp/erc/resources/base/reconnect/aborted-dupe.eld: Timeouts. * test/lisp/erc/resources/base/reconnect/aborted.eld: Timeouts. * test/lisp/erc/resources/base/renick/self/qual-chester.eld: Timeouts. * test/lisp/erc/resources/base/renick/self/qual-tester.eld: Timeouts. * test/lisp/erc/resources/erc-d/resources/dynamic-barnet.eld: Timeouts. * test/lisp/erc/resources/erc-d/resources/dynamic-foonet.eld: Timeouts. * test/lisp/erc/resources/erc-d/resources/linger.eld: Timeouts. * test/lisp/erc/resources/join/legacy/foonet.eld: Timeouts.
This commit is contained in:
parent
c96a626dce
commit
e1b8dbe9ea
20 changed files with 39 additions and 36 deletions
|
@ -2071,8 +2071,7 @@
|
|||
;; This is for integrations testing with managed configs
|
||||
;; ("starter kits") that use a different package manager.
|
||||
(init (and-let* ((found (getenv "ERC_TESTS_INIT"))
|
||||
(files (split-string found ","))
|
||||
((seq-every-p #'file-exists-p files)))
|
||||
(files (split-string found ",")))
|
||||
(mapcan (lambda (f) (list "-l" f)) files)))
|
||||
(prog
|
||||
`(progn
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
(0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(0 ":irc.barnet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 3.2 "MODE tester +i")
|
||||
((mode-user 10 "MODE tester +i")
|
||||
;; No mode answer ^
|
||||
(0 ":irc.znc.in 306 tester :You have been marked as being away")
|
||||
(0 ":tester!~u@xrir8fpe4d7ak.irc JOIN #chan")
|
||||
|
@ -34,7 +34,7 @@
|
|||
(0 ":irc.barnet.org NOTICE tester :[07:00:01] 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.")
|
||||
(0 ":irc.barnet.org 305 tester :You are no longer marked as being away"))
|
||||
|
||||
((mode 6 "MODE #chan")
|
||||
((mode 10 "MODE #chan")
|
||||
(0 ":irc.barnet.org 324 tester #chan +nt")
|
||||
(0 ":irc.barnet.org 329 tester #chan 1619593200")
|
||||
(0.25 ":joe!~u@svpn88yjcdj42.irc PRIVMSG #chan :mike: But, in defense, by mercy, 'tis most just.")
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
(0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(0 ":irc.foonet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 3.2 "MODE tester +i")
|
||||
((mode-user 10 "MODE tester +i")
|
||||
;; No mode answer ^
|
||||
(0 ":irc.znc.in 306 tester :You have been marked as being away")
|
||||
(0 ":tester!~u@nvfhxvqm92rm6.irc JOIN #chan")
|
||||
|
@ -39,7 +39,7 @@
|
|||
(0 ":irc.foonet.org NOTICE tester :[07:00:32] 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.")
|
||||
(0 ":irc.foonet.org 305 tester :You are no longer marked as being away"))
|
||||
|
||||
((mode 6 "MODE #chan")
|
||||
((mode 10 "MODE #chan")
|
||||
(0 ":irc.foonet.org 324 tester #chan +nt")
|
||||
(0 ":irc.foonet.org 329 tester #chan 1619593200")
|
||||
(0.9 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #chan :bob: Grows, lives, and dies, in single blessedness.")
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;; -*- mode: lisp-data; -*-
|
||||
((nick 1 "NICK tester"))
|
||||
((user 1 "USER user 0 * :tester")
|
||||
((nick 10 "NICK tester"))
|
||||
((user 10 "USER user 0 * :tester")
|
||||
(0.0 ":irc.foonet.org 433 * tester :Nickname is reserved by a different account")
|
||||
(0.0 ":irc.foonet.org FAIL NICK NICKNAME_RESERVED tester :Nickname is reserved by a different account"))
|
||||
|
||||
((nick 3 "NICK tester`")
|
||||
((nick 10 "NICK tester`")
|
||||
(0.1 ":irc.foonet.org 001 tester` :Welcome to the foonet IRC Network tester`")
|
||||
(0.0 ":irc.foonet.org 002 tester` :Your host is irc.foonet.org, running version oragono-2.6.1-937b9b02368748e5")
|
||||
(0.0 ":irc.foonet.org 003 tester` :This server was created Fri, 24 Sep 2021 01:38:36 UTC")
|
||||
|
@ -21,10 +21,10 @@
|
|||
(0.2 ":irc.foonet.org 266 tester` 3 3 :Current global users 3, max 3")
|
||||
(0.0 ":irc.foonet.org 422 tester` :MOTD File is missing"))
|
||||
|
||||
((mode-user 3.2 "MODE tester` +i")
|
||||
((mode-user 10 "MODE tester` +i")
|
||||
(0.0 ":irc.foonet.org 221 tester` +i")
|
||||
(0.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."))
|
||||
|
||||
((privmsg 42.6 "PRIVMSG NickServ :IDENTIFY tester changeme")
|
||||
((privmsg 10 "PRIVMSG NickServ :IDENTIFY tester changeme")
|
||||
(0.01 ":tester`!~u@rpaau95je67ci.irc NICK tester")
|
||||
(0.0 ":NickServ!NickServ@localhost NOTICE tester :You're now logged in as tester"))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- mode: lisp-data; -*-
|
||||
((nick 1 "NICK tester"))
|
||||
((user 1 "USER user 0 * :tester")
|
||||
((nick 10 "NICK tester"))
|
||||
((user 10 "USER user 0 * :tester")
|
||||
(0.0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester")
|
||||
(0.0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.1-937b9b02368748e5")
|
||||
(0.0 ":irc.foonet.org 003 tester :This server was created Fri, 24 Sep 2021 01:38:36 UTC")
|
||||
|
@ -17,14 +17,14 @@
|
|||
(0.0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(0.0 ":irc.foonet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 1.2 "MODE tester +i")
|
||||
((mode-user 10 "MODE tester +i")
|
||||
(0.0 ":irc.foonet.org 221 tester +i")
|
||||
(0.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."))
|
||||
|
||||
((privmsg 17.21 "PRIVMSG bob :hi")
|
||||
((privmsg 10 "PRIVMSG bob :hi")
|
||||
(0.02 ":bob!~u@ecnnh95wr67pv.net PRIVMSG tester :hola")
|
||||
(0.01 ":bob!~u@ecnnh95wr67pv.net PRIVMSG tester :how r u?"))
|
||||
|
||||
((quit 18.19 "QUIT :" quit)
|
||||
((quit 10 "QUIT :" quit)
|
||||
(0.01 ":tester!~u@rpaau95je67ci.irc QUIT :Quit: " quit))
|
||||
((drop 1 DROP))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- mode: lisp-data; -*-
|
||||
((nick 1 "NICK tester"))
|
||||
((user 1 "USER user 0 * :tester")
|
||||
((nick 10 "NICK tester"))
|
||||
((user 10 "USER user 0 * :tester")
|
||||
(0.1 ":irc.foonet.org 001 dummy :Welcome to the foonet IRC Network dummy")
|
||||
(0.0 ":irc.foonet.org 002 dummy :Your host is irc.foonet.org, running version oragono-2.6.1-937b9b02368748e5")
|
||||
(0.0 ":irc.foonet.org 003 dummy :This server was created Fri, 24 Sep 2021 01:38:36 UTC")
|
||||
|
@ -22,10 +22,10 @@
|
|||
(0.01 ":bob!~u@ecnnh95wr67pv.net PRIVMSG dummy :back?")
|
||||
)
|
||||
|
||||
((mode-user 1.2 "MODE dummy +i")
|
||||
((mode-user 10 "MODE dummy +i")
|
||||
(0.0 ":irc.foonet.org 221 dummy +i")
|
||||
(0.0 ":irc.foonet.org NOTICE dummy :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."))
|
||||
|
||||
((renick 42.6 "NICK tester")
|
||||
((renick 10 "NICK tester")
|
||||
(0.01 ":dummy!~u@rpaau95je67ci.irc NICK tester")
|
||||
(0.0 ":NickServ!NickServ@localhost NOTICE dummy :You're now logged in as tester"))
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
(0.0 ":soju.im 005 tester CHATHISTORY=1000 CASEMAPPING=ascii NETWORK=Soju :are supported")
|
||||
(0.0 ":soju.im 422 tester :No MOTD"))
|
||||
|
||||
((mode 1 "MODE tester +i")
|
||||
((mode 10 "MODE tester +i")
|
||||
(0.0 ":tester!tester@10.0.2.100 JOIN #chan/foonet")
|
||||
(0.25 ":soju.im 331 tester #chan/foonet :No topic is set")
|
||||
(0.0 ":soju.im 353 tester = #chan/foonet :@bob/foonet alice/foonet tester")
|
||||
|
|
|
@ -38,4 +38,4 @@
|
|||
(0.05 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: As he regards his aged father's life.")
|
||||
(0.05 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: It is a rupture that you may easily heal; and the cure of it not only saves your brother, but keeps you from dishonor in doing it."))
|
||||
|
||||
((linger 1 LINGER))
|
||||
((linger 2 LINGER))
|
||||
|
|
|
@ -43,4 +43,4 @@
|
|||
(0.1 ":alice!~u@ertp7idh9jtgi.irc PRIVMSG #chan :bob: Orlando, my liege; the youngest son of Sir Rowland de Boys.")
|
||||
(0.1 ":bob!~u@ertp7idh9jtgi.irc PRIVMSG #chan :alice: The ape is dead, and I must conjure him."))
|
||||
|
||||
((linger 1 LINGER))
|
||||
((linger 2 LINGER))
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
(-0.02 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(-0.02 ":irc.foonet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((~mode-user 3.2 "MODE tester +i")
|
||||
((~mode-user 10 "MODE tester +i")
|
||||
(-0.02 ":irc.foonet.org 221 tester +i")
|
||||
(-0.02 ":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."))
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(0 ":irc.foonet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 3.2 "MODE tester +i")
|
||||
((mode-user 10 "MODE tester +i")
|
||||
(0 ":irc.foonet.org 221 tester +i")
|
||||
(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."))
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(0 ":irc.foonet.org 266 chester 3 4 :Current global users 3, max 4")
|
||||
(0 ":irc.foonet.org 422 chester :MOTD File is missing"))
|
||||
|
||||
((mode-user 1.2 "MODE chester +i")
|
||||
((mode-user 10 "MODE chester +i")
|
||||
(0 ":irc.foonet.org 221 chester +i")
|
||||
(0 ":irc.foonet.org NOTICE chester :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."))
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(0 ":irc.foonet.org 266 tester 4 4 :Current global users 4, max 4")
|
||||
(0 ":irc.foonet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 1.2 "MODE tester +i")
|
||||
((mode-user 10 "MODE tester +i")
|
||||
(0 ":irc.foonet.org 221 tester +i")
|
||||
(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."))
|
||||
|
||||
|
|
|
@ -83,6 +83,8 @@ returning."
|
|||
(ignore-errors (kill-buffer buf)))))
|
||||
(sleep-for erc-d-t-cleanup-sleep-secs)))))
|
||||
|
||||
(defvar erc-d-t--wait-message-prefix "Awaiting: ")
|
||||
|
||||
(defmacro erc-d-t-wait-for (max-secs msg &rest body)
|
||||
"Wait for BODY to become non-nil.
|
||||
Or signal error with MSG after MAX-SECS. When MAX-SECS is negative,
|
||||
|
@ -99,7 +101,7 @@ be desirable."
|
|||
(let ((inverted (make-symbol "inverted"))
|
||||
(time-out (make-symbol "time-out"))
|
||||
(result (make-symbol "result")))
|
||||
`(ert-info ((concat "Awaiting: " ,msg))
|
||||
`(ert-info ((concat erc-d-t--wait-message-prefix ,msg))
|
||||
(let ((,time-out (abs ,max-secs))
|
||||
(,inverted (< ,max-secs 0))
|
||||
(,result ',result))
|
||||
|
@ -120,7 +122,8 @@ On failure, emit MSG."
|
|||
(unless (or (stringp msg) (memq (car-safe msg) '(format concat)))
|
||||
(push msg body)
|
||||
(setq msg (prin1-to-string body)))
|
||||
`(erc-d-t-wait-for (- (abs ,max-secs)) ,msg (not (progn ,@body))))
|
||||
`(let ((erc-d-t--wait-message-prefix "Sustaining: "))
|
||||
(erc-d-t-wait-for (- (abs ,max-secs)) ,msg (not (progn ,@body)))))
|
||||
|
||||
(defun erc-d-t-search-for (timeout text &optional from on-success)
|
||||
"Wait for TEXT to appear in current buffer before TIMEOUT secs.
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
(let ((hunks (erc-d-u-scan-e-sd info))
|
||||
(pos (erc-d-u-scan-e-pos info)))
|
||||
(or (and (erc-d-u-scan-d-hunks hunks)
|
||||
(buffer-live-p (erc-d-u-scan-d-buf hunks))
|
||||
(with-current-buffer (erc-d-u-scan-d-buf hunks)
|
||||
(goto-char pos)
|
||||
(condition-case _err
|
||||
|
|
|
@ -463,7 +463,7 @@ including line delimiters."
|
|||
;; Misc process properties:
|
||||
;;
|
||||
;; The server property `:dialog-dialogs' is an alist of (symbol
|
||||
;; . erc-d-u-scan-d) conses, each of which pairs a dialogs name with
|
||||
;; . erc-d-u-scan-d) conses, each of which pairs a dialog's name with
|
||||
;; info on its read progress (described above in the Commentary).
|
||||
;; This list is populated by `erc-d-run' at the start of each session.
|
||||
;;
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
(0. ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(0. ":irc.barnet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 1.2 "MODE tester +i")
|
||||
((mode-user 2 "MODE tester +i")
|
||||
(0. ":irc.barnet.org 221 tester +Zi")
|
||||
(0. ":irc.barnet.org 306 tester :You have been marked as being away")
|
||||
(0 ":tester!~u@awyxgybtkx7uq.irc JOIN #chan")
|
||||
(0 ":irc.barnet.org 353 joe = #chan :+joe!~joe@example.com @%+mike!~mike@example.org")
|
||||
(0 ":irc.barnet.org 366 joe #chan :End of NAMES list"))
|
||||
|
||||
((mode 1 "MODE #chan")
|
||||
((mode 3 "MODE #chan")
|
||||
(0 ":irc.barnet.org 324 tester #chan +nt")
|
||||
(0 ":irc.barnet.org 329 tester #chan 1620805269")
|
||||
(0.1 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: Yes, a dozen; and as many to the vantage, as would store the world they played for.")
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
(0. ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(0. ":irc.foonet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 1.2 "MODE tester +i")
|
||||
((mode-user 2 "MODE tester +i")
|
||||
(0. ":irc.foonet.org 221 tester +Zi")
|
||||
(0. ":irc.foonet.org 306 tester :You have been marked as being away")
|
||||
(0 ":tester!~u@awyxgybtkx7uq.irc JOIN #chan")
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
(0 ":irc.example.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(0 ":irc.example.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 1.2 "MODE tester +i")
|
||||
((mode-user 2 "MODE tester +i")
|
||||
(0 ":irc.example.org 221 tester +Zi")
|
||||
(0 ":irc.example.org 306 tester :You have been marked as being away")
|
||||
(0 ":tester!~tester@localhost JOIN #chan")
|
||||
(0 ":irc.example.org 353 alice = #chan :+alice!~alice@example.com @%+bob!~bob@example.org")
|
||||
(0 ":irc.example.org 366 alice #chan :End of NAMES list"))
|
||||
|
||||
((mode-chan 1.2 "MODE #chan")
|
||||
((mode-chan 2 "MODE #chan")
|
||||
(0 ":bob!~bob@example.org PRIVMSG #chan :hey"))
|
||||
|
||||
((linger 1.0 LINGER))
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3")
|
||||
(0 ":irc.foonet.org 422 tester :MOTD File is missing"))
|
||||
|
||||
((mode-user 3.2 "MODE tester +i")
|
||||
((mode-user 10 "MODE tester +i")
|
||||
(0 ":irc.foonet.org 221 tester +i")
|
||||
(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."))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue