>From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Wed, 19 May 2021 06:06:58 -0700 Subject: [PATCH 12/28] Update ERC scenarios with session-centric naming * test/lisp/erc/erc-scenarios.el: Update scenario-based tests to assert collision-resistant buffer-naming behavior favoring declared session IDs and advertised network names. Update test data in test/lisp/erc/erc-scenarios-resources to reflect these changes. See bug#48598 for background. * test/lisp/erc/erc-scenarios-common.el: Add new file with helpers for scenario-based tests. This is currently only used in-tree by erc-scenarios.el, but it's needed by at least one other bug's WIP patch set and will presumably be shared among other erc-scenario-*.el files in the future. --- test/lisp/erc/erc-scenarios-48598.el | 988 ---------- test/lisp/erc/erc-scenarios-common.el | 151 ++ .../47522/ambiguous-join/barnet.lispdata | 23 - .../autojoin/foonet-again.lispdata | 39 - .../clash-of-chans/autojoin/foonet.lispdata | 36 - .../uniquify-fail/barnet.lispdata | 63 - .../uniquify-fail/foonet.lispdata | 63 - .../uniquify-litter/barnet.lispdata | 66 - .../uniquify-litter/foonet.lispdata | 56 - .../rebuffed/foil-rename/barnet.lispdata | 51 - .../48598/rebuffed/gapless/foonet.lispdata | 5 - .../aborted-reconnect/foonet-dupe.lispdata | 28 + .../base/aborted-reconnect/foonet.lispdata | 45 + .../bouncer-history/barnet.lispdata | 7 +- .../bouncer-history/foonet.lispdata | 7 +- .../association/multi-net}/barnet.lispdata | 4 +- .../association/multi-net}/foonet.lispdata | 4 +- .../nick-bump/renicked-again.lispdata | 30 + .../association/nick-bump/renicked.lispdata | 30 + .../reconnect-playback/foonet-again.lispdata | 42 + .../reconnect-playback/foonet.lispdata | 52 + .../association/same-network/chester.lispdata | 40 + .../same-network/tester-again.lispdata | 37 + .../association/same-network/tester.lispdata | 42 + .../channel-buffer-revival/foonet.lispdata | 45 + .../gapless-connect}/barnet.lispdata | 19 +- .../gapless-connect}/foonet.lispdata | 39 +- .../base/gapless-connect/pass-stub.lispdata | 4 + .../legacy-autojoin}/foonet.lispdata | 34 +- .../base/reconnect-timer/foonet-last.lispdata | 5 + .../base/reconnect-timer/foonet.lispdata | 6 + .../renick/queries/bouncer-barnet.lispdata | 54 + .../renick/queries/bouncer-foonet.lispdata | 52 + .../base/renick/queries/solo.lispdata | 55 + .../base/renick/self/auto.lispdata | 46 + .../base/renick/self/manual.lispdata | 50 + .../base/renick/self/qual-chester.lispdata | 40 + .../base/renick/self/qual-tester.lispdata | 46 + .../server-buffers}/barnet.lispdata | 10 +- .../server-buffers}/foonet.lispdata | 5 +- .../session-id/bouncer/barnet-again.lispdata | 50 + .../session-id/bouncer/barnet-drop.lispdata} | 37 +- .../session-id/bouncer}/barnet.lispdata | 5 +- .../session-id/bouncer/foonet-again.lispdata | 50 + .../session-id/bouncer/foonet-drop.lispdata | 46 + .../session-id/bouncer}/foonet.lispdata | 5 +- .../session-id/bouncer/stub-again.lispdata | 4 + .../session-id/same-network/chester.lispdata | 48 + .../session-id/same-network/tester.lispdata | 52 + .../announced-missing/foonet.lispdata | 8 + .../services/password/libera.lispdata | 49 + test/lisp/erc/erc-scenarios.el | 1677 ++++++++++++++++- 52 files changed, 2971 insertions(+), 1479 deletions(-) delete mode 100644 test/lisp/erc/erc-scenarios-48598.el create mode 100644 test/lisp/erc/erc-scenarios-common.el delete mode 100644 test/lisp/erc/erc-scenarios-resources/47522/ambiguous-join/barnet.lispdata delete mode 100644 test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/foonet-again.lispdata delete mode 100644 test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/foonet.lispdata delete mode 100644 test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-fail/barnet.lispdata delete mode 100644 test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-fail/foonet.lispdata delete mode 100644 test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-litter/barnet.lispdata delete mode 100644 test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-litter/foonet.lispdata delete mode 100644 test/lisp/erc/erc-scenarios-resources/48598/rebuffed/foil-rename/barnet.lispdata delete mode 100644 test/lisp/erc/erc-scenarios-resources/48598/rebuffed/gapless/foonet.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/aborted-reconnect/foonet-dupe.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/aborted-reconnect/foonet.lispdata rename test/lisp/erc/erc-scenarios-resources/{48598/clash-of-chans => base/association}/bouncer-history/barnet.lispdata (96%) rename test/lisp/erc/erc-scenarios-resources/{48598/clash-of-chans => base/association}/bouncer-history/foonet.lispdata (97%) rename test/lisp/erc/erc-scenarios-resources/{47522/foil-in-server-buf => base/association/multi-net}/barnet.lispdata (97%) rename test/lisp/erc/erc-scenarios-resources/{47522/foil-in-server-buf => base/association/multi-net}/foonet.lispdata (97%) create mode 100644 test/lisp/erc/erc-scenarios-resources/base/association/nick-bump/renicked-again.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/association/nick-bump/renicked.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/association/reconnect-playback/foonet-again.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/association/reconnect-playback/foonet.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/association/same-network/chester.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/association/same-network/tester-again.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/association/same-network/tester.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/channel-buffer-revival/foonet.lispdata rename test/lisp/erc/erc-scenarios-resources/{48598/rebuffed/gapless => base/gapless-connect}/barnet.lispdata (80%) rename test/lisp/erc/erc-scenarios-resources/{48598/rebuffed/foil-rename => base/gapless-connect}/foonet.lispdata (51%) create mode 100644 test/lisp/erc/erc-scenarios-resources/base/gapless-connect/pass-stub.lispdata rename test/lisp/erc/erc-scenarios-resources/{47522/ambiguous-join => base/legacy-autojoin}/foonet.lispdata (51%) create mode 100644 test/lisp/erc/erc-scenarios-resources/base/reconnect-timer/foonet-last.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/reconnect-timer/foonet.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/renick/queries/bouncer-barnet.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/renick/queries/bouncer-foonet.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/renick/queries/solo.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/renick/self/auto.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/renick/self/manual.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/renick/self/qual-chester.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/renick/self/qual-tester.lispdata rename test/lisp/erc/erc-scenarios-resources/{48598/rebuffed/reuseless => base/reuse-buffers/server-buffers}/barnet.lispdata (92%) rename test/lisp/erc/erc-scenarios-resources/{48598/rebuffed/reuseless => base/reuse-buffers/server-buffers}/foonet.lispdata (94%) create mode 100644 test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet-again.lispdata rename test/lisp/erc/erc-scenarios-resources/{48598/clash-of-chans/autojoin/barnet.lispdata => base/session-id/bouncer/barnet-drop.lispdata} (55%) rename test/lisp/erc/erc-scenarios-resources/{48598/clash-of-chans/rename-buffers => base/session-id/bouncer}/barnet.lispdata (96%) create mode 100644 test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet-again.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet-drop.lispdata rename test/lisp/erc/erc-scenarios-resources/{48598/clash-of-chans/rename-buffers => base/session-id/bouncer}/foonet.lispdata (96%) create mode 100644 test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/stub-again.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/session-id/same-network/chester.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/base/session-id/same-network/tester.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/networks/announced-missing/foonet.lispdata create mode 100644 test/lisp/erc/erc-scenarios-resources/services/password/libera.lispdata diff --git a/test/lisp/erc/erc-scenarios-48598.el b/test/lisp/erc/erc-scenarios-48598.el deleted file mode 100644 index 7876b08e45..0000000000 --- a/test/lisp/erc/erc-scenarios-48598.el +++ /dev/null @@ -1,988 +0,0 @@ -;;; erc-scenarios-48598.el --- e2e test cases for ERC -*- lexical-binding: t -*- - -;; Copyright (C) 2021 Free Software Foundation, Inc. -;; -;; This file is part of GNU Emacs. -;; -;; This program is free software: you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation, either version 3 of the -;; License, or (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, but -;; WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -;; General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see -;; . - -;;; Commentary: -;; -;; These are meant to demo unwanted behavior described in bug#48598. -;; To allow for incrementally addressing those issues, they have been -;; written to *pass* when run from a historical snapshot of the tree -;; built with libraries and tools that existed at or in the months -;; leading up to 0c7a7433dce1b93a685396986d3a560c9cc291f1. See next -;; commit for updated scenarios and layout adapted for long-term use -;; with an eye toward maintenance and refactoring. -;; -;; Because 595e506c82 "Set +i by default" constitutes a breaking -;; change and these test are meant to verify pre-0c7a7433d behavior, -;; the option `erc-user-mode' has been artificially overridden to -;; restore its original default value of nil. - -;;; Code: -(require 'ert-x) ; cl-lib - -(eval-and-compile - (when-let ((dir (getenv "EMACS_TEST_DIRECTORY"))) - (cl-pushnew (concat dir "/lisp/erc/erc-d") load-path :test #'equal))) -(require 'erc-d) -(require 'erc-d-t) -(require 'erc-backend) - -(declare-function erc-network-name "erc-networks") -(defvar erc-autojoin-channels-alist) -(defvar erc-network) - -(defvar erc-scenarios-resources-dir - (let ((ert-resource-directory-trim-right-regexp "\\(-48598\\)?\\.el")) - (ert-resource-directory))) - -(when (boundp 'process-prioritize-lower-fds) - (setq process-prioritize-lower-fds t)) - -;; When interactive, teardown is already inhibited, which precludes -;; subsequent tests. So might as well treat inspection as the goal. -(unless noninteractive - (setq erc-server-auto-reconnect nil)) - -(defvar erc-scenarios--dialog-name nil) - -(defvar erc-scenarios--extra-teardown nil) - -(defun erc-scenarios-common-buflist (prefix) - "Return list of buffers with names sharing PREFIX." - (let (case-fold-search) - (delq nil (mapcar (lambda (b) - (when (string-prefix-p prefix (buffer-name b)) b)) - (buffer-list))))) - -(defmacro erc-scenarios-common-with-cleanup (bindings &rest body) - "Provide boilerplate cleanup tasks after calling BODY with BINDINGS. -Set `erc-scenarios-resources-dir' for the current ERT test. If a -process exists with the default dumb-server name, wait for it to start -before running BODY. If `erc-autojoin-mode' mode is bound, restore it -during cleanup if negated by BODY. Other defaults common to these test -cases are added below and can be overridden, except when wanting the -\"real\" default value, which must be looked up or captured outside of -this form." - (declare (indent 1)) - (let* ((orig-autojoin-mode (make-symbol "orig-autojoin-mode")) - (get-name `(expand-file-name - (or erc-scenarios--dialog-name - (substring (symbol-name - (ert-test-name (ert-running-test))) - ,(length "erc-scenarios-"))) - erc-scenarios-resources-dir)) - (defaults `((erc-d-u-canned-dialog-dir ,get-name) - (erc-user-mode nil) - (erc-modules (copy-sequence erc-modules)) - (,orig-autojoin-mode (bound-and-true-p erc-autojoin-mode)) - (erc-autojoin-channels-alist nil) - (erc-server-auto-reconnect nil)))) - `(erc-d-t-with-cleanup (,@defaults ,@bindings) - (ert-info ("Restore autojoin kill ERC buffers") - (when erc-scenarios--extra-teardown - (ert-info ("Running extra teardown") - (funcall erc-scenarios--extra-teardown))) - (when (and (boundp 'erc-autojoin-mode) - (not (eq erc-autojoin-mode ,orig-autojoin-mode))) - (erc-autojoin-mode (if ,orig-autojoin-mode +1 -1))) - (when noninteractive - (when (and (boundp 'trace-buffer) (get-buffer trace-buffer)) - (with-current-buffer trace-buffer - (message "%S" (buffer-string)) - (kill-buffer))) - (erc-d-t-kill-related-buffers))) - (ert-info ("Wait for dumb server") - (dolist (buf (buffer-list)) - (with-current-buffer buf - (when erc-d-u--process-buffer - (erc-d-t-search-for 3 "Starting"))))) - (ert-info ("Activate erc-debug-irc-protocol") - (unless (and noninteractive (not erc-debug-irc-protocol)) - (erc-toggle-debug-irc-protocol))) - ,@body))) - -(defvar erc-scenarios--port 16667) - -(defun erc-scenarios--port() - "Set next port without checking if it's open." - (cl-incf erc-scenarios--port)) - -(defmacro erc-scenarios-with-local-watcher (found-sym target-var &rest body) - "Run BODY with mutations to TARGET-VAR recorded in FOUND-SYM." - (declare (indent 2)) - (let ((func (make-symbol "func"))) - `(let* (,found-sym - (,func (lambda (_s v op w) - (when (and (eq op 'set) - w ; buffer when buffer-local else nil - v) - (push v ,found-sym))))) - (should-not (get-variable-watchers ,target-var)) - (add-variable-watcher ,target-var ,func) - ,@body - (remove-variable-watcher ,target-var ,func) - (should-not (get-variable-watchers ,target-var))))) - -;; This test lineup should match ERT's - -(ert-deftest erc-scenarios-47522/ambiguous-join () - "Recast non-bug #47522 for regression defense." - (erc-scenarios-common-with-cleanup - ((erc-server-flood-penalty 0.1) ; see below - (dumb-server-foonet-buffer (get-buffer-create "*server-foonet*")) - (dumb-server-barnet-buffer (get-buffer-create "*server-barnet*")) - (dumb-server-foonet-port (erc-scenarios--port)) - (dumb-server-barnet-port (erc-scenarios--port)) - ;; Hmm, should maybe add name as formal param to `erc-d-run' - (dumb-server-foonet (erc-d-run "localhost" dumb-server-foonet-port - "server-foonet" 'foonet)) - (dumb-server-barnet (erc-d-run "localhost" dumb-server-barnet-port - "server-barnet" 'barnet)) - (expect (erc-d-t-make-expecter)) - erc-server-buffer-foo - erc-server-buffer-bar) - - (ert-info ("Connect to foonet") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port dumb-server-foonet-port - :nick "tester" - :password "changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (funcall expect 3 "debug mode") - (erc-cmd-JOIN "#chan"))) - - (erc-d-t-wait-for 2 "Buffer #chan@foonet exists" - (get-buffer "#chan")) - - (ert-info ("Connect to barnet") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port dumb-server-barnet-port - :nick "tester" - :password "changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-bar - (funcall expect 1 "debug mode"))) - - ;; If either of these two went through, we'd get a bad match on - ;; exchange "linger" (right?) - (ert-info ("Buffers don't exist") - (with-current-buffer erc-server-buffer-foo - (erc-cmd-JOIN "#chan")) - (sit-for 0.1) - (with-current-buffer "#chan" - (erc-cmd-JOIN "#chan")) - (sit-for 0.1) - (erc-d-t-wait-for 2 "Buffer #chan@foonet not replaced" - (get-buffer "#chan")) - (erc-d-t-wait-for 1 "Buffer #chan@barnet does not exist" - (= 1 (length (erc-scenarios-common-buflist "#chan")))) - ;; Still respects chine2e wall because subproc would dump same - ;; to stdout - (with-current-buffer dumb-server-barnet-buffer - (goto-char (point-min)) - (should-not (search-forward "JOIN" nil t)))) - - (ert-info ("All #chan@foonet output consumed") - (with-current-buffer "#chan" ; <- First chan joined (foonet) - (funcall expect 3 "welcome!") - (while (accept-process-output erc-server-process)) - (funcall expect 3 "husband"))))) - -(ert-deftest erc-scenarios-47522/foil-in-server-buf () - "Different spin on non-bug #47522 for regression defense." - (erc-scenarios-common-with-cleanup - ((erc-d-linger-secs 0.5) - (erc-server-flood-penalty 0.1) - (dumb-server-foonet-buffer (get-buffer-create "*server-foonet*")) - (dumb-server-barnet-buffer (get-buffer-create "*server-barnet*")) - (dumb-server-foonet-port (erc-scenarios--port)) - (dumb-server-barnet-port (erc-scenarios--port)) - (dumb-server-foonet (erc-d-run "localhost" dumb-server-foonet-port - "server-foonet" 'foonet)) - (dumb-server-barnet (erc-d-run "localhost" dumb-server-barnet-port - "server-barnet" 'barnet)) - (expect (erc-d-t-make-expecter)) - erc-server-buffer-foo - erc-server-buffer-bar) - - (ert-info ("Connect to foonet") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port dumb-server-foonet-port - :nick "tester" - :password "changeme" - :full-name "tester"))) - - (with-current-buffer erc-server-buffer-foo - (funcall expect 3 "debug mode") - (erc-cmd-JOIN "#chan")) - - (erc-d-t-wait-for 2 "Buffer #chan@foonet exists" - (get-buffer "#chan")) - - (ert-info ("Connect to barnet") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port dumb-server-barnet-port - :nick "tester" - :password "changeme" - :full-name "tester"))) - - (with-current-buffer erc-server-buffer-bar - (funcall expect 1 "debug mode") - (erc-cmd-JOIN "#chan")) - - (erc-d-t-wait-for 3 "Buffer #chan@barnet exists" - (get-buffer "#chan/127.0.0.1<2>")) - - (erc-d-t-wait-for 2 "Buffer #chan@foonet replaced" - (and (get-buffer "#chan/127.0.0.1") - (not (get-buffer "#chan")))) - - (ert-info ("All #chan@foonet output consumed") - (with-current-buffer "#chan/127.0.0.1" ; <- First chan joined (foonet) - (funcall expect 3 "bob") - (funcall expect 3 "was created on") - (while (accept-process-output erc-server-process)) - (funcall expect 3 "prosperous"))) - - (ert-info ("All #chan@barnet output consumed") - (with-current-buffer "#chan/127.0.0.1<2>" - (funcall expect 3 "mike") - (funcall expect 3 "was created on") - (while (accept-process-output erc-server-process)) - (funcall expect 3 "ingenuous"))))) - -;; On some systems, this first bunch may need some bumping of timeouts, -;; linger-secs, etc. See function `erc-d-u-rewrite-for-slow-mo'. - -;; XXX 9bb8d90cdd Allow irc network symbols in erc-autojoin-channels-alist -;; Fixes the inciting action here but not the root cause -(ert-deftest erc-scenarios-48598/clash-of-chans/autojoin () - (ert-skip "obsolete") - (should erc-reuse-buffers) - - (erc-scenarios-common-with-cleanup - ((erc-d-u-with-cleanup-sleep-secs 1) - (erc-server-flood-penalty 0.5) - (port (erc-scenarios--port)) - (dumb-server (erc-d-run "localhost" port - 'foonet 'barnet 'foonet-again)) - (dumb-server-buffer (get-buffer "*erc-d-server*")) - (expect (erc-d-t-make-expecter)) - erc-server-buffer-foo erc-server-process-foo - erc-server-buffer-bar erc-server-process-bar) - - (should (memq 'autojoin erc-modules)) - - (ert-info ("Connect to foonet") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "foonet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (setq erc-server-process-foo erc-server-process) - (should (string= (buffer-name) (format "127.0.0.1:%d" port))) - (erc-d-t-wait-for 1 "foonet Network detected" - (string= (erc-network-name) "foonet")) - (funcall expect 5 "foonet"))) - - (ert-info ("Join #chan, then quit") - (with-current-buffer erc-server-buffer-foo - (erc-cmd-JOIN "#chan")) - (erc-d-t-wait-for 5 "Buffer #chan exists" - (get-buffer "#chan")) - (with-current-buffer "#chan" - (funcall expect 5 "vile thing") - (erc-cmd-QUIT ""))) - - (erc-d-t-wait-for 2 "foo death" - (not (process-live-p erc-server-process-foo))) - - (should (equal erc-autojoin-channels-alist '(("foonet.org" "#chan")))) - - (ert-info ("Connect to barnet") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "barnet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-bar - (setq erc-server-process-bar erc-server-process) - (should (string= (buffer-name) (format "127.0.0.1:%d" port))) - (erc-d-t-wait-for 5 "barnet Network detected" - (should-not (eq (process-status erc-server-process) 'failed)) - (eq erc-network 'barnet)))) - - (ert-info ("Server buffers are the same") - (should (eq erc-server-buffer-foo erc-server-buffer-bar)) - (should-not (cdr (erc-scenarios-common-buflist "127.0.0.1")))) - - (ert-info ("Only one #chan buffer exists") - (should (= 1 (length (erc-scenarios-common-buflist "#chan"))))) - - (ert-info ("#chan is auto-joined, output exclusive to barnet") - (with-current-buffer "#chan" - (funcall expect 2 "") - (erc-d-t-wait-for 3 "server-buffer is barnet" - (eq erc-server-process erc-server-process-bar)))) - - (ert-info ("Reconnect to foonet") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "foonet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (setq erc-server-process-foo erc-server-process) - (erc-d-t-wait-for 5 "foonet buffer renamed" - (string= (buffer-name) - (format "127.0.0.1:%d/127.0.0.1<2>" port))) - (erc-d-t-wait-for 2 "foonet Network detected" - (eq erc-network 'foonet)) - (funcall expect 5 "foonet"))) - - (ert-info ("#chan's server alternates as does its content") - (with-current-buffer "#chan" - (erc-scenarios-with-local-watcher procs 'erc-server-process - (erc-d-t-wait-for 3 "server buffer alternates" - (and (memq erc-server-process-foo procs) - (memq erc-server-process-bar procs)))) - (funcall expect 2 "") - (funcall expect 2 ""))) - - (ert-info ("All output received") - (with-current-buffer "#chan" - (while (accept-process-output erc-server-process-foo)) - (while (accept-process-output erc-server-process-bar)) - ;; Ordering here may not be predictable - (erc-d-t-search-for 1 "not given me") - (erc-d-t-search-for 1 "hath an uncle here"))) - - (erc-d-t-wait-for 5 "dumb-server death" - (not (eq (process-status dumb-server) 'run))))) - -(ert-deftest erc-scenarios-48598/clash-of-chans/bouncer-history () - (should erc-reuse-buffers) - - (erc-scenarios-common-with-cleanup - ((erc-d-u-with-cleanup-sleep-secs 1) - (erc-d-linger-secs 1) - (port (erc-scenarios--port)) - (dumb-server (erc-d-run "localhost" port 'foonet 'barnet)) - (dumb-server-buffer (get-buffer "*erc-d-server*")) - (erc-server-flood-penalty 0.5) - (expect (erc-d-t-make-expecter)) - erc-autojoin-channels-alist - erc-server-buffer-foo erc-server-process-foo - erc-server-buffer-bar erc-server-process-bar) - - (ert-info ("Connect to foonet") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "foonet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (setq erc-server-process-foo erc-server-process) - (should (string= (buffer-name) (format "127.0.0.1:%d" port))) - (funcall expect 5 "foonet"))) - - (ert-info ("Connect to barnet") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "barnet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-bar - (setq erc-server-process-bar erc-server-process) - ;; Prior to 88567ca8 "Fix ERC Reuse buffer behavior", this didn't - ;; feature an suffix - (erc-d-t-wait-for 5 "overshot n-suffixed redundant name" - (string= (buffer-name) (format "127.0.0.1:%d/127.0.0.1<2>" port))) - (funcall expect 5 "barnet"))) - - (ert-info ("Server buffers are unique") - (should-not (eq erc-server-buffer-foo erc-server-buffer-bar)) - (should (= 2 (length (erc-scenarios-common-buflist "127.0.0.1"))))) - - (ert-info ("Networks named correctly") - (with-current-buffer erc-server-buffer-foo - (erc-d-t-wait-for 3 "network name foonet" - (string= (erc-network-name) "foonet"))) - (with-current-buffer erc-server-buffer-bar - (erc-d-t-wait-for 3 "network name barnet" - (string= (erc-network-name) "barnet")))) - - (ert-info ("Only one #chan buffer exists") - (should (= 1 (length (erc-scenarios-common-buflist "#chan"))))) - - (ert-info ("#chan's server alternates as does its content") - (erc-scenarios-with-local-watcher procs 'erc-server-process - (with-current-buffer "#chan" - (erc-d-t-search-for 1 "") - (erc-d-t-search-for 1 "") - (erc-d-t-wait-for 3 "server buffer alternates" - (and (memq erc-server-process-foo procs) - (memq erc-server-process-bar procs)))))) - - (ert-info ("All output sent") - (with-current-buffer "#chan" - (while (accept-process-output erc-server-process-foo)) - (while (accept-process-output erc-server-process-bar)) - (erc-d-t-search-for 3 "please your lordship"))) - - (erc-d-t-wait-for 5 "dumb-server dies on its own" - (not (eq (process-status dumb-server) 'run))))) - -(ert-deftest erc-scenarios-48598/clash-of-chans/rename-buffers () - (should erc-reuse-buffers) - - (erc-scenarios-common-with-cleanup - ((erc-d-u-with-cleanup-sleep-secs 1) - (erc-server-flood-penalty 0.1) - (port (erc-scenarios--port)) - (dumb-server (erc-d-run "localhost" port 'foonet 'barnet)) - (dumb-server-buffer (get-buffer "*erc-d-server*")) - (expect (erc-d-t-make-expecter)) - (erc-rename-buffers t) - erc-server-buffer-foo erc-server-process-foo - erc-server-buffer-bar erc-server-process-bar) - - (ert-info ("Connect to foonet, server briefly named nil") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "foonet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (setq erc-server-process-foo erc-server-process) - (should (string= (buffer-name) "nil")) - (erc-d-t-wait-for 3 "network name foonet" - (string= (erc-network-name) "foonet")) - (funcall expect 5 "foonet"))) - - (erc-d-t-wait-for 5 "Foonet's server buffer renamed" - (get-buffer "foonet")) - (should (eq erc-server-buffer-foo (get-buffer "foonet"))) - - (ert-info ("Join #chan@foonet") - (with-current-buffer erc-server-buffer-foo - (erc-cmd-JOIN "#chan")) - (erc-d-t-wait-for 5 "Buffer #chan created" - (get-buffer "#chan")) - (with-current-buffer "#chan" - (funcall expect 5 ""))) - - (ert-info ("Connect to barnet, server briefly named nil") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "barnet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-bar - (setq erc-server-process-bar erc-server-process) - (should (string= (buffer-name) "nil")) - (erc-d-t-wait-for 3 "network name barnet" - (string= (erc-network-name) "barnet")) - (funcall expect 5 "barnet"))) - - (erc-d-t-wait-for 5 "Barnet's server buffer renamed" - (get-buffer "barnet")) - (should (eq erc-server-buffer-bar (get-buffer "barnet"))) - - (ert-info ("Server buffers are unique, no buffer with old names") - (should-not (eq erc-server-buffer-foo erc-server-buffer-bar)) - (should-not (erc-scenarios-common-buflist "127.0.0.1"))) - - (ert-info ("Join #chan@barnet") - (with-current-buffer erc-server-buffer-bar - (erc-cmd-JOIN "#chan"))) - - (ert-info ("#chan's server alternates along with content") - (erc-scenarios-with-local-watcher procs 'erc-server-process - (with-current-buffer "#chan" - (erc-d-t-search-for 1 "") - (erc-d-t-search-for 1 "") - (erc-d-t-wait-for 3 "server buffer alternates" - (and (memq erc-server-process-foo procs) - (memq erc-server-process-bar procs)))))) - - (ert-info ("Only one #chan buffer exists") - (should (= 1 (length (erc-scenarios-common-buflist "#chan"))))) - - (ert-info ("All output sent") - (with-current-buffer "#chan" - (while (accept-process-output erc-server-process-foo)) - (while (accept-process-output erc-server-process-bar)) - (erc-d-t-search-for 1 "ape is dead") - (erc-d-t-search-for 1 "keeps you from dishonour"))) - - (erc-d-t-wait-for 5 "dumb-server death" - (not (eq (process-status dumb-server) 'run))))) - -;; This one is a temporary departure from the "assume defaults" rule -;; mentioned in the Commentary. (Which is bad.) -;; -;; TODO tag this as :unstable if ever adding to Emacs -;; TODO see if meaning is preserved when autojoin is ON (if so, adapt) - -(ert-deftest erc-scenarios-48598/clash-of-chans/uniquify-fail () - (should erc-reuse-buffers) - - (erc-scenarios-common-with-cleanup - ((erc-d-u-with-cleanup-sleep-secs 1) - (port (erc-scenarios--port)) - (dumb-server (erc-d-run "localhost" port 'foonet 'barnet)) - (dumb-server-buffer (get-buffer "*erc-d-server*")) - (expect (erc-d-t-make-expecter)) - (erc-server-flood-penalty 0.1) ; hack - (erc-modules (remq 'autojoin erc-modules)) - erc-server-buffer-foo erc-server-process-foo - erc-server-buffer-bar erc-server-process-bar - erc-autojoin-channels-alist - erc-reuse-buffers) - - (when (bound-and-true-p erc-autojoin-mode) - (erc-autojoin-mode -1)) - - (ert-info ("Connect to foonet") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "foonet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (setq erc-server-process-foo erc-server-process) - ;; Compare suffixed name here to that in bouncer-history variant - ;; (which has `erc-reuse-buffers' set to the default value of t) - (should (string= (buffer-name) - (format "127.0.0.1:%d/127.0.0.1" port))) - (funcall expect 5 "foonet"))) - - (ert-info ("Connect to barnet") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "barnet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-bar - (setq erc-server-process-bar erc-server-process) - ;; Prior to 88567ca8 "Fix ERC Reuse buffer behavior", this didn't - ;; feature an suffix - (erc-d-t-wait-for 5 "overshot n-suffixed redundant name" - (string= (buffer-name) (format "127.0.0.1:%d/127.0.0.1<2>" port))) - (funcall expect 5 "barnet"))) - - (ert-info ("Server buffers are unique") - (should-not (eq erc-server-buffer-foo erc-server-buffer-bar)) - (should (= 2 (length (erc-scenarios-common-buflist "127.0.0.1"))))) - - (ert-info ("Networks named correctly") - (with-current-buffer erc-server-buffer-foo - (erc-d-t-wait-for 3 "network name foonet" - (string= (erc-network-name) "foonet"))) - (with-current-buffer erc-server-buffer-bar - (erc-d-t-wait-for 3 "network name barnet" - (string= (erc-network-name) "barnet")))) - - (ert-info ("Only one #chan buffer exists") - (let ((chan-bufs (erc-scenarios-common-buflist "#chan"))) - (should (string= (buffer-name (pop chan-bufs)) "#chan/127.0.0.1")) - (should-not chan-bufs))) - - ;; From here on diverges from "48598/clash-of-chans/bouncer-history" - - (ert-info ("#chan's server alternates along with its content") - (with-current-buffer "#chan/127.0.0.1" - (erc-scenarios-with-local-watcher procs 'erc-server-process - (erc-d-t-wait-for 3 "server buffer alternates" - (and (memq erc-server-process-foo procs) - (memq erc-server-process-bar procs)))) - ;; XXX this only works if the REPLY to this PART is received - ;; when foonet is dominant, which is out of our control. - (with-current-buffer erc-server-buffer-foo - (erc-cmd-PART "#chan")) - ;; Remaining foonet output is displayed but barnet is cut off - (erc-d-t-search-for 1 "shake my sword"))) - - (ert-info ("Somehow #chan@barnet is created") - (erc-d-t-wait-for 5 "#chan@barnet" - (get-buffer "#chan/127.0.0.1<2>")) - (with-current-buffer "#chan/127.0.0.1<2>" - (should (eq erc-server-process erc-server-process-bar)))) - - (ert-info ("Rejoin #chan@foonet") - (with-current-buffer "#chan/127.0.0.1" - (funcall expect 3 "You have left channel #chan") - (erc-cmd-JOIN "#chan") - (funcall expect 3 "You have joined channel #chan") - (funcall expect 3 "#chan was created on") - (funcall expect 3 "") - (should (eq erc-server-process erc-server-process-foo)) - (erc-d-t-search-for -0.2 "" (point)))) - - (ert-info ("Part chan@barnet") - (with-current-buffer "#chan/127.0.0.1<2>" - (let ((previous-end (point-max))) - (goto-char previous-end) - (should-not (search-forward "alice" nil t))) - (funcall expect 3 "Arm it in rags") - (erc-cmd-PART "#chan") - (funcall expect 3 "You have left channel #chan") - (erc-cmd-JOIN "#chan"))) - - (should (= 2 (length (erc-scenarios-common-buflist "#chan")))) - - (ert-info ("#chan output alternates as before") - (with-current-buffer "#chan/127.0.0.1" - (funcall expect 3 "You have joined channel #chan") - (funcall expect 1 "Users on #chan: @mike joe tester") - (funcall expect 5 "") ; bob appears after ^ - (ert-info ("All output sent") - (while (accept-process-output erc-server-process-bar)) - (funcall expect 10 "soul black")))) - - (while (accept-process-output erc-server-process-foo)) - - (erc-d-t-wait-for 5 "dumb-server dies on its own" - (not (eq (process-status dumb-server) 'run))))) - -;; This one also disables autojoin (see comment for "uniquify-fail") - -(ert-deftest erc-scenarios-48598/clash-of-chans/uniquify-litter () - (should erc-reuse-buffers) - - (erc-scenarios-common-with-cleanup - ((erc-d-u-with-cleanup-sleep-secs 1) - (expect (erc-d-t-make-expecter)) - (port (erc-scenarios--port)) - (dumb-server (erc-d-run "localhost" port 'foonet 'barnet)) - (dumb-server-buffer (get-buffer "*erc-d-server*")) - (erc-server-flood-penalty 0.5) - (erc-modules (remq 'autojoin erc-modules)) - erc-reuse-buffers - erc-server-buffer-foo erc-server-process-foo - erc-server-buffer-bar erc-server-process-bar) - - (when (bound-and-true-p erc-autojoin-mode) - (erc-autojoin-mode -1)) - - (ert-info ("Connect to foonet, get uniquified buffer name") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "foonet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (setq erc-server-process-foo erc-server-process) - ;; Compare suffixed name here to that in bouncer-history variant - ;; (which has `erc-reuse-buffers' set to the default value of (t)) - (should (string= (buffer-name) - (format "127.0.0.1:%d/127.0.0.1" port))) - (erc-d-t-search-for 5 "foonet"))) - - (ert-info ("Connect to barnet, get uniquified buffer name") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "barnet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-bar - (setq erc-server-process-bar erc-server-process) - ;; Prior to 88567ca8 "Fix ERC Reuse buffer behavior", this didn't - ;; feature an suffix - (erc-d-t-wait-for 5 "overshot n-suffixed redundant name" - (string= (buffer-name) (format "127.0.0.1:%d/127.0.0.1<2>" port))) - (funcall expect 5 "barnet"))) - - (ert-info ("Server buffers are unique") - (should-not (eq erc-server-buffer-foo erc-server-buffer-bar)) - (should (= 2 (length (erc-scenarios-common-buflist "127.0.0.1"))))) - - (ert-info ("Networks named correctly") - (with-current-buffer erc-server-buffer-foo - (erc-d-t-wait-for 3 "network name foonet" - (string= (erc-network-name) "foonet"))) - (with-current-buffer erc-server-buffer-bar - (erc-d-t-wait-for 3 "network name barnet" - (string= (erc-network-name) "barnet")))) - - (ert-info ("Only one #chan buffer exists") - (let ((chan-bufs (erc-scenarios-common-buflist "#chan"))) - (should (string= (buffer-name (pop chan-bufs)) "#chan/127.0.0.1")) - (should-not chan-bufs))) - - ;; From here on diverts from other "clash-of-chans" - - (ert-info ("#chan's server alternates as does its content") - (with-current-buffer "#chan/127.0.0.1" - (erc-scenarios-with-local-watcher procs 'erc-server-process - (erc-d-t-wait-for 3 "server buffer alternates" - (and (memq erc-server-process-foo procs) - (memq erc-server-process-bar procs)))) - (with-current-buffer erc-server-buffer-foo - (erc-cmd-PART "#chan")) - (funcall expect 1 ""))) - - (ert-info ("Somehow #chan@barnet is created") - (erc-d-t-wait-for 4 "#chan@barnet" - (get-buffer "#chan/127.0.0.1<2>"))) - - (ert-info ("Part chan@barnet and rejoin") - (with-current-buffer "#chan/127.0.0.1<2>" - (should (eq erc-server-process erc-server-process-bar)) - (funcall expect 3 "Claudio as himself") - (let ((previous-end (point-max))) - (goto-char previous-end) - (should-not (search-forward "alice" nil t))) - (erc-cmd-PART "#chan") - (funcall expect 3 "You have left channel #chan") - (erc-cmd-JOIN "#chan"))) - - (ert-info ("New #chan@barnet is created") - (erc-d-t-wait-for 3 "#chan@barnet" - (get-buffer "#chan/127.0.0.1<3>")) - (with-current-buffer "#chan/127.0.0.1<3>" - (should (eq erc-server-process erc-server-process-bar)) - (funcall expect 3 "You have joined channel #chan"))) - - (ert-info ("Rejoin #chan@foonet") - (with-current-buffer "#chan/127.0.0.1" - (funcall expect 3 "You have left channel #chan") - (erc-cmd-JOIN "#chan") - (funcall expect 3 "You have joined channel #chan") - (funcall expect 3 "#chan was created on") - (let ((pos (funcall expect 3 ""))) - (should (eq erc-server-process erc-server-process-foo)) - (erc-d-t-wait-for -0.2 "exclusive to foonet" - (goto-char pos) - (search-forward "joe" nil t))))) - - (should (= 3 (length (erc-scenarios-common-buflist "#chan")))) - (should (= 2 (length (erc-scenarios-common-buflist "127.0.0.1")))) - - (while (accept-process-output erc-server-process-foo)) - (while (accept-process-output erc-server-process-bar)) - - (with-current-buffer "#chan/127.0.0.1" - (funcall expect 3 "Phebe's cruelty")) - - (with-current-buffer "#chan/127.0.0.1<3>" - (funcall expect 3 "world-without-end")) - - (erc-d-t-wait-for 5 "dumb-server dies on its own" - (not (eq (process-status dumb-server) 'run))))) - -(ert-deftest erc-scenarios-48598/rebuffed/foil-rename () - (erc-scenarios-common-with-cleanup - ((erc-d-linger-secs 0.5) - (port (erc-scenarios--port)) - ;; Again, like "gapless" above, barnet is loaded first because - ;; that's what ERC requests despite the invocation order - (dumb-server (erc-d-run "localhost" port 'barnet 'foonet)) - (dumb-server-buffer (get-buffer "*erc-d-server*")) - (erc-rename-buffers t) - erc-autojoin-channels-alist - erc-server-buffer-foo - erc-server-buffer-bar) - - (ert-info ("Connect to foonet, buffer initially named nil") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "foonet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (should (string= (buffer-name) "nil")))) - - (ert-info ("Connect to barnet") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "barnet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-bar - (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) - - (erc-d-t-wait-for 1 "server for foonet renamed" (get-buffer "foonet")) - (erc-d-t-wait-for 1 "server for barnet renamed" (get-buffer "barnet")) - - (ert-info ("Server buffers are unique and temp names are absent") - (should-not (eq erc-server-buffer-foo erc-server-buffer-bar)) - (should-not (erc-scenarios-common-buflist "127.0.0.1")) - (should-not (get-buffer "nil"))) - - (ert-info ("Channel buffers are both healthy") - (with-current-buffer "#foo" - (while (accept-process-output erc-server-process)) - (erc-d-t-search-for 1 "whence you are") - (delete-process erc-server-process)) - (with-current-buffer "#bar" - (while (accept-process-output erc-server-process)) - (erc-d-t-search-for 1 "his second fit") - (delete-process erc-server-process))) - - (erc-d-t-wait-for 5 "dumb-server dies naturally" - (not (process-live-p dumb-server))))) - -;; Note: when inspecting this one interactively, sometimes server buffers -;; appear as "nil" if the disconnect hook ran before the latest mode-line -;; update. - -(ert-deftest erc-scenarios-48598/rebuffed/gapless () - ;; This is stable with deterministic ordering before and just after - ;; 0c7a7433dce1b93a685396986d3a560c9cc291f1 - ;; Problem remains but would require fancier footwork to show (basically - ;; pattern matching and hot loading one of two dialogs) - :tags '(:unstable) - (ert-skip "obsolete") - (erc-scenarios-common-with-cleanup - ((erc-d-linger-secs 2) - (erc-server-flood-penalty erc-server-flood-penalty) - ;; Barnet is loaded first because that's what's requested first by - ;; the client, as shown below. - (dumb-server (erc-d-run "localhost" (erc-scenarios--port) - 'barnet 'foonet)) - (dumb-server-buffer (get-buffer "*erc-d-server*")) - (expect (erc-d-t-make-expecter)) - erc-autojoin-channels-alist - erc-server-buffer-foo erc-server-process-foo - erc-server-buffer-bar erc-server-process-bar - timeout-sentinel) - (ert-info ("Connect twice to same endpoint without pausing") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port erc-scenarios--port - :nick "tester" - :password "foonet:changeme" - :full-name "tester") - erc-server-buffer-bar (erc :server "127.0.0.1" - :port erc-scenarios--port - :nick "tester" - :password "barnet:changeme" - :full-name "tester"))) - - (ert-info ("Returned server buffers are identical") - (should (eq erc-server-buffer-foo erc-server-buffer-bar))) - - (ert-info ("Both connections actually happen") - (should (get-process "erc-d-server")) - (let ((name (format "erc-127.0.0.1-%d" erc-scenarios--port))) - (setq erc-server-process-foo (get-process name) - erc-server-process-bar (get-process (concat name "<1>"))))) - - (set-process-query-on-exit-flag erc-server-process-foo nil) - (set-process-query-on-exit-flag erc-server-process-bar nil) - - (with-current-buffer erc-server-buffer-bar - (funcall expect 1 "marked as being away")) - - (cl-letf (((symbol-function 'erc-d--expire) - (lambda (_ e) (push e timeout-sentinel)))) - - (erc-d-t-wait-for 20 "Buffer #bar exists" - (get-buffer "#bar")) - - (with-current-buffer erc-server-buffer-bar - ;; XXX a cheat to save some time. Verify by commenting out - ;; and bumping timeouts. Should still pass (after ~10 secs). - (ert-info ("Kludge to save some time") - (setq erc-server-flood-penalty 0) - (erc-server-send-queue erc-server-buffer-bar)) - - (erc-d-t-wait-for 5 "all messages actually sent" - (not erc-server-flood-queue))) - - (with-current-buffer "#bar" - (erc-d-t-search-for 5 "Unauthorized command") - (erc-d-t-search-for 5 "was created on")) - (erc-d-t-wait-for 2 "#foo dialog times out" timeout-sentinel) - - (let ((e (pop timeout-sentinel))) - (should-not timeout-sentinel) - (should (eq 'pass (erc-d-exchange-tag e))) - (should (string= "\\`PASS doa" (erc-d-exchange-pattern e))))) - - (while (accept-process-output erc-server-process-foo)) - (while (accept-process-output erc-server-process-bar)) - - (erc-d-t-wait-for 5 "dumb-server to die on its own" - (not (process-live-p dumb-server))))) - -(defun erc-scenarios-common--48598/rebuffed/reuseless () - (erc-scenarios-common-with-cleanup - ((erc-d-linger-secs 1) - (port (erc-scenarios--port)) - (dumb-server (erc-d-run "localhost" port 'foonet 'barnet)) - (dumb-server-buffer (get-buffer "*erc-d-server*")) - erc-autojoin-channels-alist - erc-server-buffer-foo - erc-server-buffer-bar) - - (ert-info ("Connect to foonet") - (setq erc-server-buffer-foo (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "foonet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-foo - (should (string= (buffer-name) - (if erc-reuse-buffers - (format "127.0.0.1:%d" port) - (format "127.0.0.1:%d/127.0.0.1" port)))) - (erc-d-t-search-for 1 "marked as being away"))) - - (ert-info ("Connect to barnet") - (setq erc-server-buffer-bar (erc :server "127.0.0.1" - :port port - :nick "tester" - :password "barnet:changeme" - :full-name "tester")) - (with-current-buffer erc-server-buffer-bar - (should (string= (buffer-name) - (if erc-reuse-buffers - (format "127.0.0.1:%d/127.0.0.1<2>" port) - (format "127.0.0.1:%d/127.0.0.1" port)))) - (erc-d-t-search-for 1 "marked as being away"))) - - (ert-info ("Server buffers are unique with option, identical without") - (if erc-reuse-buffers - (should-not (eq erc-server-buffer-foo erc-server-buffer-bar)) - (should (eq erc-server-buffer-foo erc-server-buffer-bar)))) - - (ert-info ("When the option is disabled, only one buffer survives") - (should (= (length (erc-scenarios-common-buflist "127.0.0.1")) - (if erc-reuse-buffers 2 1)))) - - ;; Sometimes we get an EOF, but it's rare - (erc-d-t-wait-for 5 "Let dumb server die on its own" - (not (process-live-p dumb-server))))) - -(ert-deftest erc-scenarios-48598/rebuffed/reuseless--enabled () - (should erc-reuse-buffers) - (let ((erc-scenarios--dialog-name "48598/rebuffed/reuseless")) - (erc-scenarios-common--48598/rebuffed/reuseless))) - -(ert-deftest erc-scenarios-48598/rebuffed/reuseless--disabled () - (should erc-reuse-buffers) - (let ((erc-scenarios--dialog-name "48598/rebuffed/reuseless") - erc-reuse-buffers) - (erc-scenarios-common--48598/rebuffed/reuseless))) - -;;; erc-scenarios-48598.el ends here diff --git a/test/lisp/erc/erc-scenarios-common.el b/test/lisp/erc/erc-scenarios-common.el new file mode 100644 index 0000000000..a77833e8ae --- /dev/null +++ b/test/lisp/erc/erc-scenarios-common.el @@ -0,0 +1,151 @@ +;;; erc-scenarios-common.el --- common helpers for ERC scenarios -*- lexical-binding: t -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. +;; +;; This file is part of GNU Emacs. +;; +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; . + +;;; Commentary: + +;; This file should not contain any test cases. + +(require 'ert-x) ; cl-lib + +(eval-and-compile (let ((dir (getenv "EMACS_TEST_DIRECTORY"))) + (when dir + (load (concat dir "/lisp/erc/erc-d/erc-d-t") nil t) + (load (concat dir "/lisp/erc/erc-d/erc-d") nil t)))) +(require 'erc-d) +(require 'erc-d-t) +(require 'erc-backend) + +(defvar erc-scenarios-common--resources-dir + (expand-file-name (concat (ert-resource-directory) + "../erc-scenarios-resources/"))) + +;; Because teardown is already inhibited when running interactively, +;; which prevents subsequent tests from succeeding, we might as well +;; treat inspection as the goal. +(unless noninteractive + (setq erc-server-auto-reconnect nil)) + +(defvar erc-scenarios-common-dialog nil) +(defvar erc-scenarios-common-extra-teardown nil) + +(defun erc-scenarios-common--add-silence () + (advice-add #'erc-login :around #'erc-d-t-silence-around) + (advice-add #'erc-handle-login :around #'erc-d-t-silence-around) + (advice-add #'erc-server-connect :around #'erc-d-t-silence-around)) + +(defun erc-scenarios-common--remove-silence () + (advice-remove #'erc-login #'erc-d-t-silence-around) + (advice-remove #'erc-handle-login #'erc-d-t-silence-around) + (advice-remove #'erc-server-connect #'erc-d-t-silence-around)) + +(defun erc-scenarios-common--print-trace () + (when (and (boundp 'trace-buffer) (get-buffer trace-buffer)) + (with-current-buffer trace-buffer + (message "%S" (buffer-string)) + (kill-buffer)))) + +(defun erc-scenarios-common--make-bindings (bindings) + `((erc-d-u-canned-dialog-dir (expand-file-name + (or erc-scenarios-common-dialog + (cadr (assq 'erc-scenarios-common-dialog + ',bindings))) + erc-scenarios-common--resources-dir)) + (erc-d-spec-vars `(,@erc-d-spec-vars + (quit . ,(erc-quit/part-reason-default)) + (erc-version . ,erc-version))) + (erc-modules (copy-sequence erc-modules)) + (auth-source-do-cache nil) + (erc-autojoin-channels-alist nil) + (erc-server-auto-reconnect nil) + ,@bindings)) + +(defmacro erc-scenarios-common-with-cleanup (bindings &rest body) + "Provide boilerplate cleanup tasks after calling BODY with BINDINGS. + +If an `erc-d' process exists, wait for it to start before running BODY. +If `erc-autojoin-mode' mode is bound, restore it during cleanup if +disabled by BODY. Other defaults common to these test cases are added +below and can be overridden, except when wanting the \"real\" default +value, which must be looked up or captured outside of the calling form. + +Dialog resource directories are located by expanding the variable +`erc-scenarios-common-dialog' or its value in BINDINGS." + (declare (indent 1)) + + (let* ((orig-autojoin-mode (make-symbol "orig-autojoin-mode")) + (combind `((,orig-autojoin-mode (bound-and-true-p erc-autojoin-mode)) + ,@(erc-scenarios-common--make-bindings bindings)))) + + `(erc-d-t-with-cleanup (,@combind) + + (ert-info ("Restore autojoin, etc., kill ERC buffers") + (dolist (buf (buffer-list)) + (when-let ((erc-d-u--process-buffer) + (proc (get-buffer-process buf))) + (erc-d-t-wait-for 5 "Dumb server dies on its own" + (not (process-live-p proc))))) + + (erc-scenarios-common--remove-silence) + + (when erc-scenarios-common-extra-teardown + (ert-info ("Running extra teardown") + (funcall erc-scenarios-common-extra-teardown))) + + (when (and (boundp 'erc-autojoin-mode) + (not (eq erc-autojoin-mode ,orig-autojoin-mode))) + (erc-autojoin-mode (if ,orig-autojoin-mode +1 -1))) + + (when noninteractive + (erc-scenarios-common--print-trace) + (erc-d-t-kill-related-buffers))) + + (erc-scenarios-common--add-silence) + + (ert-info ("Wait for dumb server") + (dolist (buf (buffer-list)) + (with-current-buffer buf + (when erc-d-u--process-buffer + (erc-d-t-search-for 3 "Starting"))))) + + (ert-info ("Activate erc-debug-irc-protocol") + (unless (and noninteractive (not erc-debug-irc-protocol)) + (erc-toggle-debug-irc-protocol))) + + ,@body))) + +(defun erc-scenarios-common-assert-initial-buf-name (id port) + ;; Assert no limbo period when explicit ID given + (should (string= (if id + (symbol-name id) + (format "127.0.0.1:%d" port)) + (buffer-name)))) + +(defun erc-scenarios-common-buflist (prefix) + "Return list of buffers with names sharing PREFIX." + (let (case-fold-search) + (erc--sid-sort-buffers + (delq nil + (mapcar (lambda (b) + (when (string-prefix-p prefix (buffer-name b)) b)) + (buffer-list)))))) + +(provide 'erc-scenarios-common) + +;;; erc-scenarios-common.el ends here diff --git a/test/lisp/erc/erc-scenarios-resources/47522/ambiguous-join/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/47522/ambiguous-join/barnet.lispdata deleted file mode 100644 index c570457ebf..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/47522/ambiguous-join/barnet.lispdata +++ /dev/null @@ -1,23 +0,0 @@ -;; -*- mode: lisp-data; -*- -((pass 1 "PASS :changeme")) -((nick 1 "NICK tester")) -((user 1 "USER user 0 * :tester") - (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") - (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.6.0-7481bf0385b95b16") - (0 ":irc.barnet.org 003 tester :This server was created Wed, 05 May 2021 00:51:49 UTC") - (0 ":irc.barnet.org 004 tester irc.barnet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") - (0 ":irc.barnet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") - (0 ":irc.barnet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=barnet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") - (0 ":irc.barnet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") - (0 ":irc.barnet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") - (0 ":irc.barnet.org 252 tester 0 :IRC Operators online") - (0 ":irc.barnet.org 253 tester 0 :unregistered connections") - (0 ":irc.barnet.org 254 tester 1 :channels formed") - (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") - (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") - (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") - (0 ":irc.barnet.org 221 tester +i") - (0 ":irc.barnet.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.")) - -((linger 2 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/foonet-again.lispdata b/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/foonet-again.lispdata deleted file mode 100644 index 1d62150762..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/foonet-again.lispdata +++ /dev/null @@ -1,39 +0,0 @@ -;; -*- mode: lisp-data; -*- -((pass-redux 10 "PASS :foonet:changeme")) -((nick-redux 1 "NICK tester")) - -((user-redux 1 "USER user 0 * :tester") - (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") - (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") - (0 ":irc.foonet.org 003 tester :This server was created Mon, 10 May 2021 00:58:22 UTC") - (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") - (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") - (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") - (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") - (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") - (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") - (0 ":irc.foonet.org 254 tester 1 :channels formed") - (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") - (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") - (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") - ;; History - (0 ":tester!~u@q6ddatxcq6txy.irc JOIN #chan") - (0 ":irc.foonet.org 353 tester = #chan :@alice bob tester") - (0 ":irc.foonet.org 366 tester #chan :End of /NAMES list.") - (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") - (0 ":bob!~u@q6ddatxcq6txy.irc PRIVMSG #chan :[02:43:23] alice: And soar with them above a common bound.") - (0 ":alice!~u@q6ddatxcq6txy.irc PRIVMSG #chan :[02:43:27] bob: And be aveng'd on cursed Tamora.") - (0 ":bob!~u@q6ddatxcq6txy.irc PRIVMSG #chan :[02:43:29] alice: He did love her, sir, as a gentleman loves a woman.") - (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.")) - -((mode-redux 1 "MODE #chan") - (0 ":irc.foonet.org 324 tester #chan +nt") - (0 ":irc.foonet.org 329 tester #chan 1620608304") - (0.1 ":alice!~u@q6ddatxcq6txy.irc PRIVMSG #chan :bob: Ay, madam, with the swiftest wing of speed.") - (0.1 ":bob!~u@q6ddatxcq6txy.irc PRIVMSG #chan :alice: Five times in that ere once in our five wits.") - (0.1 ":alice!~u@q6ddatxcq6txy.irc PRIVMSG #chan :bob: And bid him come to take his last farewell.") - (0.1 ":bob!~u@q6ddatxcq6txy.irc PRIVMSG #chan :alice: But we are spirits of another sort.") - (0.1 ":alice!~u@q6ddatxcq6txy.irc PRIVMSG #chan :bob: It was not given me, nor I did not buy it.")) - -((linger 6 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/foonet.lispdata deleted file mode 100644 index b20b1e72ec..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/foonet.lispdata +++ /dev/null @@ -1,36 +0,0 @@ -;; -*- mode: lisp-data; -*- -((pass 1 "PASS :foonet:changeme")) -((nick 1 "NICK tester")) - -((user 1 "USER user 0 * :tester") - (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") - (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") - (0 ":irc.foonet.org 003 tester :This server was created Mon, 10 May 2021 00:58:22 UTC") - (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") - (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") - (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") - (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") - (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") - (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") - (0 ":irc.foonet.org 254 tester 1 :channels formed") - (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") - (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") - (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing")) - -((join 1 "JOIN #chan") - (0 ":tester!~u@q6ddatxcq6txy.irc JOIN #chan") - (0 ":irc.foonet.org 353 tester = #chan :@alice bob tester") - (0 ":irc.foonet.org 366 tester #chan :End of NAMES list") - (0.1 ":bob!~u@q6ddatxcq6txy.irc PRIVMSG #chan :tester, welcome!") - (0 ":alice!~u@q6ddatxcq6txy.irc PRIVMSG #chan :tester, welcome!")) - -((mode 1 "MODE #chan") - (0 ":irc.foonet.org 324 tester #chan +nt") - (0 ":irc.foonet.org 329 tester #chan 1620608304") - (0.1 ":bob!~u@q6ddatxcq6txy.irc PRIVMSG #chan :alice: Pray you, sir, deliver me this paper.") - (0.1 ":alice!~u@q6ddatxcq6txy.irc PRIVMSG #chan :bob: Wake when some vile thing is near.")) - -((quit 1 "QUIT :\2ERC\2")) - -((drop 0 DROP)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-fail/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-fail/barnet.lispdata deleted file mode 100644 index d6555d3fc4..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-fail/barnet.lispdata +++ /dev/null @@ -1,63 +0,0 @@ -;; -*- mode: lisp-data; -*- -((pass 1 "PASS :barnet:changeme")) -((nick 1 "NICK tester")) -((user 1 "USER user 0 * :tester") - (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") - (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.6.0-7481bf0385b95b16") - (0 ":irc.barnet.org 003 tester :This server was created Wed, 05 May 2021 09:05:33 UTC") - (0 ":irc.barnet.org 004 tester irc.barnet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") - (0 ":irc.barnet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") - (0 ":irc.barnet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=barnet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") - (0 ":irc.barnet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") - (0 ":irc.barnet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") - (0 ":irc.barnet.org 252 tester 0 :IRC Operators online") - (0 ":irc.barnet.org 254 tester 1 :channels formed") - (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") - (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") - (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") - (0 ":irc.znc.in 306 tester :You have been marked as being away") - (0 ":tester!~u@wvys46tx8tpmk.irc JOIN #chan") - (0 ":irc.barnet.org 353 tester = #chan :joe @mike tester") - (0 ":irc.barnet.org 366 tester #chan :End of /NAMES list.") - (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") - (0 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :[09:09:16] joe: Tush! none but minstrels like of sonneting.") - (0 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :[09:09:19] mike: Prithee, nuncle, be contented; 'tis a naughty night to swim in. Now a little fire in a wide field were like an old lecher's heart; a small spark, all the rest on's body cold. Look! here comes a walking fire.") - (0 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :[09:09:22] joe: My name is Edgar, and thy father's son.") - (0 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :[09:09:26] mike: Good my lord, be good to me; your honour is accounted a merciful man; good my lord.") - (0 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :[09:09:31] joe: Thy child shall live, and I will see it nourish'd.") - (0 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :[09:09:33] mike: Quick, quick; fear nothing; I'll be at thy elbow.") - (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") - (0 ":irc.barnet.org NOTICE tester :[09:05:35] 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 1 "MODE #chan") - (0 ":irc.barnet.org 324 tester #chan +nt") - (0 ":irc.barnet.org 329 tester #chan 1620205534") - (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: That will be given to the loudest noise we make.") - (0.1 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :mike: If it please your honour, I am the poor duke's constable, and my name is Elbow: I do lean upon justice, sir; and do bring in here before your good honour two notorious benefactors.") - (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: Following the signs, woo'd but the sign of she.") - (0.5 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :mike: That, sir, which I will not report after her.") - (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: Boyet, prepare: I will away to-night.") - (0.1 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :mike: If the man be a bachelor, sir, I can; but if he be a married man, he is his wife's head, and I can never cut off a woman's head.") - (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: Thyself upon thy virtues, they on thee.") - (0.1 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :mike: Arm it in rags, a pigmy's straw doth pierce it.")) - -((part 5.1 "PART #chan :\2ERC\2") - (0 ":tester!~u@wvys46tx8tpmk.irc PART #chan :\2ERC\2 (IRC client for Emacs " emacs-version ")")) - -((join 10.1 "JOIN #chan") - (0 ":tester!~u@wvys46tx8tpmk.irc JOIN #chan") - (0 ":irc.barnet.org 353 tester = #chan :@mike joe tester") - (0 ":irc.barnet.org 366 tester #chan :End of NAMES list") - (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :tester, welcome!") - (0 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :tester, welcome!")) - -((mode 1 "MODE #chan") - (0 ":irc.barnet.org 324 tester #chan +nt") - (0 ":irc.barnet.org 329 tester #chan 1620205534") - (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: Chi non te vede, non te pretia.") - (0.1 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :mike: Well, if ever thou dost fall from this faith, thou wilt prove a notable argument.") - (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: Of heavenly oaths, vow'd with integrity.") - (0.1 ":joe!~u@wvys46tx8tpmk.irc PRIVMSG #chan :mike: These herblets shall, which we upon you strew.") - (0.1 ":mike!~u@wvys46tx8tpmk.irc PRIVMSG #chan :joe: Aaron will have his soul black like his face.")) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-fail/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-fail/foonet.lispdata deleted file mode 100644 index 84daf7aec7..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-fail/foonet.lispdata +++ /dev/null @@ -1,63 +0,0 @@ -;; -*- mode: lisp-data; -*- -((pass 1 "PASS :foonet:changeme")) -((nick 1 "NICK tester")) -((user 1 "USER user 0 * :tester") - (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") - (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") - (0 ":irc.foonet.org 003 tester :This server was created Wed, 05 May 2021 09:05:34 UTC") - (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") - (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") - (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") - (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") - (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") - (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") - (0 ":irc.foonet.org 254 tester 1 :channels formed") - (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") - (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") - (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") - (0 ":irc.znc.in 306 tester :You have been marked as being away") - (0 ":tester!~u@247eaxkrufj44.irc JOIN #chan") - (0 ":irc.foonet.org 353 tester = #chan :alice @bob tester") - (0 ":irc.foonet.org 366 tester #chan :End of /NAMES list.") - (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") - (0 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :[09:07:19] bob: Is this; she hath bought the name of whore thus dearly.") - (0 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :[09:07:24] alice: He sent to me, sir,Here he comes.") - (0 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :[09:07:26] bob: Till I torment thee for this injury.") - (0 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :[09:07:29] alice: There's an Italian come; and 'tis thought, one of Leonatus' friends.") - (0 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :[09:09:33] bob: Ay, and the particular confirmations, point from point, to the full arming of the verity.") - (0 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :[09:09:35] alice: Kneel in the streets and beg for grace in vain.") - (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") - (0 ":irc.foonet.org NOTICE tester :[09:06:05] 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 1 "MODE #chan") - (0 ":irc.foonet.org 324 tester #chan +nt") - (0 ":irc.foonet.org 329 tester #chan 1620205534") - (0.5 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :alice: Nor I no strength to climb without thy help.") - (0.1 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :bob: Nothing, but let him have thanks. Demand of him my condition, and what credit I have with the duke.") - (0.1 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :alice: Show me this piece. I am joyful of your sights.") - (0.2 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :bob: Whilst I can shake my sword or hear the drum.")) - -((part 5 "PART #chan :\2ERC\2") - (0 ":tester!~u@247eaxkrufj44.irc PART #chan :\2ERC\2 (IRC client for Emacs " emacs-version ")")) - -((join 10 "JOIN #chan") - (0 ":tester!~u@247eaxkrufj44.irc JOIN #chan") - (0 ":irc.foonet.org 353 tester = #chan :@bob alice tester") - (0 ":irc.foonet.org 366 tester #chan :End of NAMES list") - (0.1 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :tester, welcome!") - (0 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :tester, welcome!")) - -((mode 1 "MODE #chan") - (0 ":irc.foonet.org 324 tester #chan +nt") - (0 ":irc.foonet.org 329 tester #chan 1620205534") - (0.8 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :alice: Thou desirest me to stop in my tale against the hair.") - (0.1 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :bob: And dar'st not stand, nor look me in the face.") - (0.1 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :alice: It should not be, by the persuasion of his new feasting.") - (0.1 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :bob: It was not given me, nor I did not buy it.") - (0.1 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :alice: He that would vouch it in any place but here.") - (0.1 ":alice!~u@yppdd5tt4admc.irc PRIVMSG #chan :bob: In everything I wait upon his will.") - (0.1 ":bob!~u@yppdd5tt4admc.irc PRIVMSG #chan :alice: Thou counterfeit'st most lively.")) - -((linger 1 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-litter/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-litter/barnet.lispdata deleted file mode 100644 index 2b821bf8f0..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-litter/barnet.lispdata +++ /dev/null @@ -1,66 +0,0 @@ -;; -*- mode: lisp-data; -*- -((pass 1 "PASS :barnet:changeme")) -((nick 1 "NICK tester")) -((user 1 "USER user 0 * :tester") - (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") - (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.6.0-7481bf0385b95b16") - (0 ":irc.barnet.org 003 tester :This server was created Thu, 06 May 2021 02:02:40 UTC") - (0 ":irc.barnet.org 004 tester irc.barnet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") - (0 ":irc.barnet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") - (0 ":irc.barnet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=barnet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") - (0 ":irc.barnet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") - (0 ":irc.barnet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") - (0 ":irc.barnet.org 252 tester 0 :IRC Operators online") - (0 ":irc.barnet.org 254 tester 1 :channels formed") - (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") - (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") - (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") - (0 ":irc.znc.in 306 tester :You have been marked as being away") - (0 ":tester!~u@43inc6hukdiwg.irc JOIN #chan") - (0 ":irc.barnet.org 353 tester = #chan :@joe mike tester") - (0 ":irc.barnet.org 366 tester #chan :End of /NAMES list.") - (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") - (0 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :[02:06:20] joe: Marry, it is your brother's right hand.") - (0 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :[02:06:23] mike: If it be prov'd! you see it is apparent.") - (0 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :[02:06:28] joe: Than would make up his message.") - (0 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :[02:06:59] mike: And almost broke my heart with extreme laughter.") - (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") - (0 ":irc.barnet.org NOTICE tester :[02:02:43] 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 1.2 "MODE #chan") - (0 ":irc.barnet.org 324 tester #chan +nt") - (0 ":irc.barnet.org 329 tester #chan 1620266561") - (0.2 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :joe: Why, by making him uncapable of Othello's place; knocking out his brains.") - ;; This stuff shows up in the automatically created uniquified buffer - (0.5 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :mike: Berowne did swear himself out of all suit.") - (0.1 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :joe: Go to, go to: no matter for the dish, sir.") - (0.1 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :mike: We will have, if this fadge not, an antick. I beseech you, follow.") - (0.1 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :joe: As like almost to Claudio as himself.")) - -((part 4.2 "PART #chan :\2ERC\2") - (0 ":tester!~u@43inc6hukdiwg.irc PART #chan :\2ERC\2")) - -((join 5.2 "JOIN #chan") - (0 ":tester!~u@43inc6hukdiwg.irc JOIN #chan") - (0 ":irc.barnet.org 353 tester = #chan :@joe mike tester") - (0 ":irc.barnet.org 366 tester #chan :End of NAMES list") - (0.1 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :tester, welcome!") - (0 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :tester, welcome!")) - -((mode-b 1.2 "MODE #chan") - (0 ":irc.barnet.org 324 tester #chan +nt") - (0 ":irc.barnet.org 329 tester #chan 1620266561") - (0.1 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :joe: To wake and wage a danger profitless.") - (0.1 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :mike: And beauty's crest becomes the heavens well.") - (0.1 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :joe: Call up my brother. O! that you had had her.") - (0.1 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :mike: Most honourably doth uphold his word.") - (0.1 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :joe: But that he's well, and will be shortly here.") - (0.1 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :mike: Samson, master: he was a man of good carriage, great carriage, for he carried the towngates on his back like a porter; and he was in love.") - (0.1 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :joe: And yet seem cold, the time you may so hoodwink.") - (0.1 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :mike: To teach a teacher ill beseemeth me.") - (0.1 ":mike!~u@43inc6hukdiwg.irc PRIVMSG #chan :joe: If you swear, my lord, you shall not be forsworn.") - (0.1 ":joe!~u@43inc6hukdiwg.irc PRIVMSG #chan :mike: To make a world-without-end bargain in.")) - -((linger 1 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-litter/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-litter/foonet.lispdata deleted file mode 100644 index 44175d2a9c..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/uniquify-litter/foonet.lispdata +++ /dev/null @@ -1,56 +0,0 @@ -;; -*- mode: lisp-data; -*- -((pass 1 "PASS :foonet:changeme")) -((nick 1 "NICK tester")) -((user 1 "USER user 0 * :tester") - (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") - (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") - (0 ":irc.foonet.org 003 tester :This server was created Thu, 06 May 2021 02:02:40 UTC") - (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") - (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") - (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") - (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") - (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") - (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") - (0 ":irc.foonet.org 254 tester 1 :channels formed") - (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") - (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") - (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") - (0 ":irc.znc.in 306 tester :You have been marked as being away") - (0 ":tester!~u@megraseia93w4.irc JOIN #chan") - (0 ":irc.foonet.org 353 tester = #chan :@alice bob tester") - (0 ":irc.foonet.org 366 tester #chan :End of /NAMES list.") - (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") - (0 ":bob!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :[02:06:42] alice: Romeo slew Tybalt, Romeo must not live.") - (0 ":alice!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :[02:06:47] bob: Signior Martino and his wife and daughters; County Anselme and his beauteous sisters; the lady widow of Vitruvio; Signior Placentio, and his lovely nieces; Mercutio and his brother Valentine; mine uncle Capulet, his wife and daughters; my fair niece Rosaline; Livia; Signior Valentio and his cousin Tybalt; Lucio and the lively Helena.") - (0 ":bob!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :[02:06:51] alice: Of nothing so much as that I am not like Timon.") - (0 ":alice!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :[02:06:55] bob: Something browner than Judas's; marry, his kisses are Judas's own children.") - (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") - (0 ":irc.foonet.org NOTICE tester :[02:03:13] 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 1 "MODE #chan") - (0 ":irc.foonet.org 324 tester #chan +nt") - (0 ":irc.foonet.org 329 tester #chan 1620266561") - (0.5 ":bob!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :alice: His looks I fear, and his intents I doubt.") - (0.3 ":alice!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :bob: But never hope to know why I should marry her.")) - -((part 2.1 "PART #chan") - (0 ":tester!~u@megraseia93w4.irc PART #chan")) - -((join 5.1 "JOIN #chan") - (0 ":tester!~u@megraseia93w4.irc JOIN #chan") - (0 ":irc.foonet.org 353 tester = #chan :@alice bob tester") - (0 ":irc.foonet.org 366 tester #chan :End of NAMES list") - (0.1 ":alice!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :tester, welcome!") - (0 ":bob!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :tester, welcome!")) - -((mode-b 1 "MODE #chan") - (0 ":irc.foonet.org 324 tester #chan +nt") - (0 ":irc.foonet.org 329 tester #chan 1620266561") - (0.1 ":bob!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :alice: Indeed, I should have asked you that before.") - (0.1 ":alice!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :bob: Her eye is sick on't: I observe her now.") - (0.1 ":bob!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :alice: For no name fits thy nature but thy own.") - (0.1 ":alice!~u@qyqgpz6tu76j6.irc PRIVMSG #chan :bob: Yet heard too much of Phebe's cruelty.")) - -((linger 1 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/foil-rename/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/foil-rename/barnet.lispdata deleted file mode 100644 index 5652d322fc..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/foil-rename/barnet.lispdata +++ /dev/null @@ -1,51 +0,0 @@ -;; -*- mode: lisp-data; -*- -((pass 10 "PASS :barnet:changeme")) -((nick 0.2 "NICK tester")) -((user 0.2 "USER user 0 * :tester") - (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") - (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.5.1-4860c5cad0179db1") - (0 ":irc.barnet.org 003 tester :This server was created Fri, 19 Mar 2021 10:23:19 UTC") - (0 ":irc.barnet.org 004 tester irc.barnet.org oragono-2.5.1-4860c5cad0179db1 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") - (0 ":irc.barnet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m INVEX KICKLEN=390 MAXLIST=beI:60 :are supported by this server") - (0 ":irc.barnet.org 005 tester MAXTARGETS=4 MODES MONITOR=100 NETWORK=barnet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX draft/CHATHISTORY=100 :are supported by this server") - (0 ":irc.barnet.org 251 tester :There are 0 users and 1 invisible on 1 server(s)") - (0 ":irc.barnet.org 252 tester 0 :IRC Operators online") - (0 ":irc.barnet.org 254 tester 0 :channels formed") - (0 ":irc.barnet.org 255 tester :I have 1 clients and 0 servers") - (0 ":irc.barnet.org 265 tester 1 1 :Current local users 1, max 1") - (0 ":irc.barnet.org 266 tester 1 1 :Current global users 1, max 1") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") - (0 ":irc.znc.in 306 tester :You have been marked as being away") - - (0 ":tester!~u@8cgjyczyrjgby.irc JOIN #bar") - (0 ":irc.barnet.org 353 tester = #bar :@mike joe tester") - (0 ":irc.barnet.org 366 tester #bar :End of /NAMES list.") - - (0 ":***!znc@znc.in PRIVMSG #bar :Buffer Playback...") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:23:28] tester, welcome!") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:23:28] tester, welcome!") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:04] mike: Marry, sir, by my wife; who, if she had been a woman cardinally given, might have been accused in fornication, adultery, and all uncleanliness there.") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:07] joe: Look, how you butt yourself in these sharp mocks.") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:10] mike: Who ? not the duke ? yes, your beggar of fifty, and his use was to put a ducat in her clack-dish; the duke had crotchets in him. He would be drunk too; that let me inform you.") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:15] joe: Look you what I have from the loving king.") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:19] mike: Sir, I know him, and I love him.") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:22] joe: Dictynna, goodman Dull: Dictynna, goodman Dull.") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:24] mike: Varlet, thou liest: thou liest, wicked varlet. The time is yet to come that she was ever respected with man, woman, or child.") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:28] joe: Nothing but peace and gentle visitation.") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:31] mike: What he hath lost noble Macbeth hath won.") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:34] joe: Patience, dear niece. Good Titus, dry thine eyes.") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:39] mike: And hear the sentence of your moved prince.") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:44] joe: To be whipped; and yet a better love than my master.") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:49] mike: Bid me farewell, and let me hear thee going.") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:54] joe: By heaven, thy love is black as ebony.") - (0 ":***!znc@znc.in PRIVMSG #bar :Playback Complete.") - - (0 ":irc.barnet.org NOTICE tester :[10:23:22] 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 10 "MODE #bar") - (0 ":irc.barnet.org 324 tester #bar +nt") - (0 ":irc.barnet.org 329 tester #bar 1616149403") - (0.1 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :mike: Friar, thou knowest not the duke so well as I do: he's a better woodman than thou takest him for.") - (0.1 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :joe: Like the sequel, I. Signior Costard, adieu.") - (0.1 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :mike: This is his second fit; he had one yesterday.")) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/gapless/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/gapless/foonet.lispdata deleted file mode 100644 index 67234e26bc..0000000000 --- a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/gapless/foonet.lispdata +++ /dev/null @@ -1,5 +0,0 @@ -;;; -*- mode: lisp-data -*- - -((pass 2.0 "PASS doa")) -((nick 0.2 "NICK tester")) -((user 0.2 "USER user 0 * :I never run!")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/aborted-reconnect/foonet-dupe.lispdata b/test/lisp/erc/erc-scenarios-resources/base/aborted-reconnect/foonet-dupe.lispdata new file mode 100644 index 0000000000..8e299ec44c --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/aborted-reconnect/foonet-dupe.lispdata @@ -0,0 +1,28 @@ +;; -*- mode: lisp-data; -*- +((pass 3 "PASS :changeme")) +((nick 1 "NICK tester")) + +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 05:06:18 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (-0.02 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (-0.02 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (-0.02 ":irc.foonet.org 253 tester 0 :unregistered connections") + (-0.02 ":irc.foonet.org 254 tester 1 :channels formed") + (-0.02 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (-0.02 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (-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") + (-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.")) + +((~join 10 "JOIN #chan")) +((eof 5 EOF)) +((drop 0 DROP)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/aborted-reconnect/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/aborted-reconnect/foonet.lispdata new file mode 100644 index 0000000000..39bec93901 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/aborted-reconnect/foonet.lispdata @@ -0,0 +1,45 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 05:06:18 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (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") + (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.")) + +((join 12 "JOIN #chan") + (0 ":tester!~u@9g6b728983yd2.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :alice tester @bob") + (0 ":irc.foonet.org 366 tester #chan :End of NAMES list")) + +((mode 4 "MODE #chan") + (0 ":irc.foonet.org 324 tester #chan +nt") + (0 ":irc.foonet.org 329 tester #chan 1620104779") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: But, as it seems, did violence on herself.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Well, this is the forest of Arden.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Signior Iachimo will not from it. Pray, let us follow 'em.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Our queen and all her elves come here anon.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: The ground is bloody; search about the churchyard.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: You have discharged this honestly: keep it to yourself. Many likelihoods informed me of this before, which hung so tottering in the balance that I could neither believe nor misdoubt. Pray you, leave me: stall this in your bosom; and I thank you for your honest care. I will speak with you further anon.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Give me that mattock, and the wrenching iron.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Stand you! You have land enough of your own; but he added to your having, gave you some ground.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Excellent workman! Thou canst not paint a man so bad as is thyself.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: And will you, being a man of your breeding, be married under a bush, like a beggar ? Get you to church, and have a good priest that can tell you what marriage is: this fellow will but join you together as they join wainscot; then one of you will prove a shrunk panel, and like green timber, warp, warp.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Live, and be prosperous; and farewell, good fellow.")) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/bouncer-history/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/bouncer-history/barnet.lispdata similarity index 96% rename from test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/bouncer-history/barnet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/association/bouncer-history/barnet.lispdata index cba56e6ccf..9a8408ad6a 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/bouncer-history/barnet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/association/bouncer-history/barnet.lispdata @@ -15,7 +15,10 @@ (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") + (0 ":irc.barnet.org 422 tester :MOTD File is missing")) + +((mode-user 3.2 "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") (0 ":irc.barnet.org 353 tester = #chan :joe @mike tester") @@ -31,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 3 "MODE #chan") +((mode 6 "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 defence, by mercy, 'tis most just.") diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/bouncer-history/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/bouncer-history/foonet.lispdata similarity index 97% rename from test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/bouncer-history/foonet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/association/bouncer-history/foonet.lispdata index 6af26038d9..58df79e19f 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/bouncer-history/foonet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/association/bouncer-history/foonet.lispdata @@ -15,7 +15,10 @@ (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) + +((mode-user 3.2 "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") (0 ":irc.foonet.org 353 tester = #chan :alice @bob tester") @@ -35,7 +38,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 3 "MODE #chan") +((mode 6 "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.") diff --git a/test/lisp/erc/erc-scenarios-resources/47522/foil-in-server-buf/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/multi-net/barnet.lispdata similarity index 97% rename from test/lisp/erc/erc-scenarios-resources/47522/foil-in-server-buf/barnet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/association/multi-net/barnet.lispdata index 99329a3acc..9aa2f2821c 100644 --- a/test/lisp/erc/erc-scenarios-resources/47522/foil-in-server-buf/barnet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/association/multi-net/barnet.lispdata @@ -16,7 +16,9 @@ (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") + (0 ":irc.barnet.org 422 tester :MOTD File is missing")) + +((mode-user 1.2 "MODE tester +i") (0 ":irc.barnet.org 221 tester +i") (0 ":irc.barnet.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.")) diff --git a/test/lisp/erc/erc-scenarios-resources/47522/foil-in-server-buf/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/multi-net/foonet.lispdata similarity index 97% rename from test/lisp/erc/erc-scenarios-resources/47522/foil-in-server-buf/foonet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/association/multi-net/foonet.lispdata index 67fbe205c4..79661a0fd2 100644 --- a/test/lisp/erc/erc-scenarios-resources/47522/foil-in-server-buf/foonet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/association/multi-net/foonet.lispdata @@ -16,7 +16,9 @@ (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) + +((mode-user 1.2 "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.")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/association/nick-bump/renicked-again.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/nick-bump/renicked-again.lispdata new file mode 100644 index 0000000000..c533d19dc1 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/association/nick-bump/renicked-again.lispdata @@ -0,0 +1,30 @@ +;; -*- mode: lisp-data; -*- +((nick 1 "NICK tester")) +((user 1 "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 1 "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") + (0.0 ":irc.foonet.org 004 tester` irc.foonet.org oragono-2.6.1-937b9b02368748e5 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0.0 ":irc.foonet.org 005 tester` AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0.1 ":irc.foonet.org 005 tester` MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0.1 ":irc.foonet.org 005 tester` draft/CHATHISTORY=100 :are supported by this server") + (0.0 ":irc.foonet.org 251 tester` :There are 0 users and 3 invisible on 1 server(s)") + (0.0 ":irc.foonet.org 252 tester` 0 :IRC Operators online") + (0.0 ":irc.foonet.org 253 tester` 0 :unregistered connections") + (0.0 ":irc.foonet.org 254 tester` 1 :channels formed") + (0.0 ":irc.foonet.org 255 tester` :I have 3 clients and 0 servers") + (0.0 ":irc.foonet.org 265 tester` 3 3 :Current local users 3, max 3") + (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 1.2 "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") + (0.01 ":tester`!~u@rpaau95je67ci.irc NICK tester") + (0.0 ":NickServ!NickServ@localhost NOTICE tester :You're now logged in as tester")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/association/nick-bump/renicked.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/nick-bump/renicked.lispdata new file mode 100644 index 0000000000..c4aff9db5f --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/association/nick-bump/renicked.lispdata @@ -0,0 +1,30 @@ +;; -*- mode: lisp-data; -*- +((nick 1 "NICK tester")) +((user 1 "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") + (0.0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.1-937b9b02368748e5 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0.0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0.01 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0.01 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0.0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0.0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0.0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0.0 ":irc.foonet.org 254 tester 1 :channels formed") + (0.0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0.0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (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") + (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 NickServ :REGISTER changeme") + (0.02 ":NickServ!NickServ@localhost NOTICE tester :Account created") + (0.01 ":NickServ!NickServ@localhost NOTICE tester :You're now logged in as tester")) + +((quit 18.19 "QUIT :" quit) + (0.01 ":tester!~u@rpaau95je67ci.irc QUIT :Quit: " quit)) +((drop 1 DROP)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/association/reconnect-playback/foonet-again.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/reconnect-playback/foonet-again.lispdata new file mode 100644 index 0000000000..1eb633260c --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/association/reconnect-playback/foonet-again.lispdata @@ -0,0 +1,42 @@ +;; -*- mode: lisp-data; -*- +((pass 4.0 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "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.0-7481bf0385b95b16") + (0.0 ":irc.foonet.org 003 tester :This server was created Wed, 16 Jun 2021 04:15:00 UTC") + (0.0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0.0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0.0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0.0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0.0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0.0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0.0 ":irc.foonet.org 254 tester 1 :channels formed") + (0.0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0.0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (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") + ;; No mode answer + (0.0 ":tester!~u@mw6kegwt77kwe.irc JOIN #chan") + (0.0 ":irc.foonet.org 353 tester = #chan :alice @bob tester") + (0.0 ":irc.foonet.org 366 tester #chan :End of /NAMES list.") + (0.0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") + (0.0 ":alice!~u@mw6kegwt77kwe.irc PRIVMSG #chan :[10:37:52] bob: Thou pout'st upon thy fortune and thy love.") + (0.0 ":bob!~u@mw6kegwt77kwe.irc PRIVMSG #chan :[10:37:56] alice: With these mortals on the ground.") + (0.0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.")) + +((mode 1 "MODE #chan") + (0.0 ":irc.foonet.org 324 tester #chan +nt") + (0.0 ":irc.foonet.org 329 tester #chan 1623816901") + (0.1 ":bob!~u@mw6kegwt77kwe.irc PRIVMSG #chan :alice: My name, my good lord, is Parolles.") + (0.1 ":alice!~u@mw6kegwt77kwe.irc PRIVMSG #chan :bob: Wilt thou rest damned ? God help thee, shallow man! God make incision in thee! thou art raw.")) + +((privmsg 3.0 "PRIVMSG *status :help") + (0.0 ":*status!znc@znc.in PRIVMSG tester :In the following list all occurrences of <#chan> support wildcards (* and ?) except ListNicks") + (0.0 ":*status!znc@znc.in PRIVMSG tester :\2Version\17: Print which version of ZNC this is") + (0.0 ":*status!znc@znc.in PRIVMSG tester :\2Shutdown [message]\17: Shut down ZNC completely") + (0.0 ":*status!znc@znc.in PRIVMSG tester :\2Restart [message]\17: Restart ZNC") + (0.1 ":bob!~u@mw6kegwt77kwe.irc PRIVMSG #chan :alice: In that word's death; no words can that woe sound.") + (0.1 ":alice!~u@mw6kegwt77kwe.irc PRIVMSG #chan :bob: Look, sir, here comes the lady towards my cell.")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/association/reconnect-playback/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/reconnect-playback/foonet.lispdata new file mode 100644 index 0000000000..347e565498 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/association/reconnect-playback/foonet.lispdata @@ -0,0 +1,52 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "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.0-7481bf0385b95b16") + (0.0 ":irc.foonet.org 003 tester :This server was created Wed, 16 Jun 2021 04:15:00 UTC") + (0.0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0.0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0.0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0.0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0.0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0.0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0.0 ":irc.foonet.org 254 tester 1 :channels formed") + (0.0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0.0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (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") + ;; No mode answer + (0.0 ":irc.znc.in 306 tester :You have been marked as being away") + (0.0 ":tester!~u@mw6kegwt77kwe.irc JOIN #chan") + (0.0 ":irc.foonet.org 353 tester = #chan :alice @bob tester") + (0.0 ":irc.foonet.org 366 tester #chan :End of /NAMES list.") + (0.0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") + (0.0 ":alice!~u@mw6kegwt77kwe.irc PRIVMSG #chan :[10:35:50] bob: To Laced mon did my land extend.") + (0.0 ":bob!~u@mw6kegwt77kwe.irc PRIVMSG #chan :[10:35:55] alice: This is but a custom in your tongue; you bear a graver purpose, I hope.") + (0.0 ":alice!~u@mw6kegwt77kwe.irc PRIVMSG #chan :[10:37:16] bob: To imitate them; faults that are rich are fair.") + (0.0 ":bob!~u@mw6kegwt77kwe.irc PRIVMSG #chan :[10:37:18] alice: Our Romeo hath not been in bed to-night.") + (0.0 ":alice!~u@mw6kegwt77kwe.irc PRIVMSG #chan :[10:37:21] bob: But, in defence, by mercy, 'tis most just.") + (0.0 ":bob!~u@mw6kegwt77kwe.irc PRIVMSG #chan :[10:37:25] alice: Younger than she are happy mothers made.") + (0.0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") + (0.0 ":irc.foonet.org 305 tester :You are no longer marked as being away")) + +((mode 1 "MODE #chan") + (1.0 ":irc.foonet.org 324 tester #chan +nt") + (0.0 ":irc.foonet.org 329 tester #chan 1623816901") + (0.1 ":alice!~u@mw6kegwt77kwe.irc PRIVMSG #chan :bob: At thy good heart's oppression.") + (0.1 ":bob!~u@mw6kegwt77kwe.irc PRIVMSG #chan :alice: But purgatory, torture, hell itself.")) + +((privmsg 3 "PRIVMSG *status :help") + (0.0 ":*status!znc@znc.in PRIVMSG tester :In the following list all occurrences of <#chan> support wildcards (* and ?) except ListNicks") + (0.0 ":*status!znc@znc.in PRIVMSG tester :\2AddPort <[+]port> [bindhost [uriprefix]]\17: Add another port for ZNC to listen on") + (0.0 ":*status!znc@znc.in PRIVMSG tester :\2DelPort [bindhost]\17: Remove a port from ZNC") + (0.0 ":*status!znc@znc.in PRIVMSG tester :\2Rehash\17: Reload global settings, modules, and listeners from znc.conf") + (0.1 ":alice!~u@mw6kegwt77kwe.irc PRIVMSG #chan :bob: And at my suit, sweet, pardon what is past.") + (0.1 ":bob!~u@mw6kegwt77kwe.irc PRIVMSG #chan :alice: My lord, you give me most egregious indignity.")) + +((quit 1 "QUIT :\2ERC\2")) + +((drop 0 DROP)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/association/same-network/chester.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/same-network/chester.lispdata new file mode 100644 index 0000000000..e51cc590b0 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/association/same-network/chester.lispdata @@ -0,0 +1,40 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK chester")) +((user 1 "USER user 0 * :chester") + (0 ":irc.foonet.org 001 chester :Welcome to the foonet IRC Network chester") + (0 ":irc.foonet.org 002 chester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 chester :This server was created Sun, 13 Jun 2021 05:45:20 UTC") + (0 ":irc.foonet.org 004 chester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 chester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 chester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 chester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 chester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 chester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 chester 1 :unregistered connections") + (0 ":irc.foonet.org 254 chester 1 :channels formed") + (0 ":irc.foonet.org 255 chester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 chester 3 4 :Current local users 3, max 4") + (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 2.2 "MODE chester +i") + (0 ":irc.foonet.org 221 chester +i") + (0 ":chester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0 ":irc.foonet.org 353 chester = #chan :tester chester @alice bob") + (0 ":irc.foonet.org 366 chester #chan :End of NAMES list") + (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.")) + +((mode 10 "MODE #chan") + (0.0 ":irc.foonet.org 324 chester #chan +nt") + (0.0 ":irc.foonet.org 329 chester #chan 1623563121") + (0.0 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.0 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: Dispatch, I say, and find the forester.") + (0.0 ":tester!~u@yuvqisyu7m7qs.irc QUIT :Quit: " quit) + (0.5 ":tester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome again!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome again!")) + +((quit 20 "QUIT :" quit) + (0.0 ":chester!~u@yuvqisyu7m7qs.irc QUIT :Quit: " quit)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/association/same-network/tester-again.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/same-network/tester-again.lispdata new file mode 100644 index 0000000000..e4bbae2b45 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/association/same-network/tester-again.lispdata @@ -0,0 +1,37 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Sun, 13 Jun 2021 05:45:20 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 4 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 4 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 4 4 :Current local users 4, max 4") + (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 2.2 "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.") + (0 ":tester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :tester @alice bob chester") + (0 ":irc.foonet.org 366 tester #chan :End of NAMES list")) + +((mode 10 "MODE #chan") + (0.0 ":irc.foonet.org 324 tester #chan +nt") + (0.0 ":irc.foonet.org 329 tester #chan 1623563121") + (0.0 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome again!") + (0.0 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome again!")) + +((quit 4 "QUIT :" quit) + (0 ":tester!~u@yuvqisyu7m7qs.irc QUIT :Quit: " quit)) + +((linger 5 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/association/same-network/tester.lispdata b/test/lisp/erc/erc-scenarios-resources/base/association/same-network/tester.lispdata new file mode 100644 index 0000000000..333658fe94 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/association/same-network/tester.lispdata @@ -0,0 +1,42 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Sun, 13 Jun 2021 05:45:20 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 4 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 4 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 4 4 :Current local users 4, max 4") + (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 2.2 "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.")) + +((join 15 "JOIN #chan") + (0 ":tester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :tester @alice bob") + (0 ":irc.foonet.org 366 tester #chan :End of NAMES list")) + +((mode 10 "MODE #chan") + (0.0 ":irc.foonet.org 324 tester #chan +nt") + (0.0 ":irc.foonet.org 329 tester #chan 1623563121") + (0.0 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome!") + (0.0 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome!") + (0.0 ":chester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.0 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: Dispatch, I say, and find the forester.")) + +((quit 4 "QUIT ")) + +((drop 0 DROP)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/channel-buffer-revival/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/channel-buffer-revival/foonet.lispdata new file mode 100644 index 0000000000..cc719d275f --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/channel-buffer-revival/foonet.lispdata @@ -0,0 +1,45 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 05:06:18 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (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") + (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.")) + +((join 6 "JOIN #chan") + (0 ":tester!~u@9g6b728983yd2.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :alice tester @bob") + (0 ":irc.foonet.org 366 tester #chan :End of NAMES list")) + +((mode 8 "MODE #chan") + (0 ":irc.foonet.org 324 tester #chan +nt") + (0 ":irc.foonet.org 329 tester #chan 1620104779") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: But, as it seems, did violence on herself.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Well, this is the forest of Arden.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Signior Iachimo will not from it. Pray, let us follow 'em.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Our queen and all her elves come here anon.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: The ground is bloody; search about the churchyard.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: You have discharged this honestly: keep it to yourself. Many likelihoods informed me of this before, which hung so tottering in the balance that I could neither believe nor misdoubt. Pray you, leave me: stall this in your bosom; and I thank you for your honest care. I will speak with you further anon.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Give me that mattock, and the wrenching iron.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Stand you! You have land enough of your own; but he added to your having, gave you some ground.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Excellent workman! Thou canst not paint a man so bad as is thyself.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: And will you, being a man of your breeding, be married under a bush, like a beggar ? Get you to church, and have a good priest that can tell you what marriage is: this fellow will but join you together as they join wainscot; then one of you will prove a shrunk panel, and like green timber, warp, warp.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Live, and be prosperous; and farewell, good fellow.")) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/gapless/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/gapless-connect/barnet.lispdata similarity index 80% rename from test/lisp/erc/erc-scenarios-resources/48598/rebuffed/gapless/barnet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/gapless-connect/barnet.lispdata index dcf630902e..a819e81775 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/gapless/barnet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/gapless-connect/barnet.lispdata @@ -1,7 +1,6 @@ ;; -*- mode: lisp-data; -*- ((pass 10 "PASS :barnet:changeme")) -((nick 0.2 "NICK tester")) - +((nick 10 "NICK tester")) ((user 0.2 "USER user 0 * :tester") (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.5.1-4860c5cad0179db1") @@ -15,7 +14,10 @@ (0 ":irc.barnet.org 255 tester :I have 1 clients and 0 servers") (0 ":irc.barnet.org 265 tester 1 1 :Current local users 1, max 1") (0 ":irc.barnet.org 266 tester 1 1 :Current global users 1, max 1") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") + (0 ":irc.barnet.org 422 tester :MOTD File is missing")) + +((mode-user 3.2 "MODE tester +i") + ;; No mode answer (0 ":irc.znc.in 306 tester :You have been marked as being away") (0 ":tester!~u@8cgjyczyrjgby.irc JOIN #bar") (0 ":irc.barnet.org 353 tester = #bar :@mike joe tester") @@ -23,23 +25,12 @@ (0 ":***!znc@znc.in PRIVMSG #bar :Buffer Playback...") (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:23:28] tester, welcome!") (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:23:28] tester, welcome!") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:23:29] joe: Pardon, sir; error: he is not quantity enough for that Worthy's thumb: he is not so big as the end of his club.") - (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:31] mike: What he hath lost noble Macbeth hath won.") - (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:44] joe: To be whipped; and yet a better love than my master.") (0 ":joe!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:49] mike: Bid me farewell, and let me hear thee going.") (0 ":mike!~u@8cgjyczyrjgby.irc PRIVMSG #bar :[10:24:54] joe: By heaven, thy love is black as ebony.") (0 ":***!znc@znc.in PRIVMSG #bar :Playback Complete.") (0 ":irc.barnet.org NOTICE tester :[10:23:22] 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")) -((~pass-extra 10 "PASS barnet:changeme") - (0 ":irc.barnet.org 462 tester :You may not reregister")) - -((~nick-extra 5 "NICK tester")) - -((~user-extra 10 "USER user 0 * :tester") - (0 ":irc.barnet.org 462 tester :You may not reregister")) - ((mode 20 "MODE #bar") (0 ":irc.barnet.org 324 tester #bar +nt") (0 ":irc.barnet.org 329 tester #bar 1616149403") diff --git a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/foil-rename/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/gapless-connect/foonet.lispdata similarity index 51% rename from test/lisp/erc/erc-scenarios-resources/48598/rebuffed/foil-rename/foonet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/gapless-connect/foonet.lispdata index cb77503244..dc76a7307f 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/foil-rename/foonet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/gapless-connect/foonet.lispdata @@ -15,34 +15,27 @@ (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") - (0 ":irc.znc.in 306 tester :You have been marked as being away") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) - (0 ":tester!~u@8cgjyczyrjgby.irc JOIN #foo") - (0 ":irc.foonet.org 353 tester = #foo :@bob alice tester") +((mode-user 3.2 "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 #foo") + (0 ":irc.foonet.org 353 tester = #foo :joe @mike tester") (0 ":irc.foonet.org 366 tester #foo :End of /NAMES list.") - (0 ":***!znc@znc.in PRIVMSG #foo :Buffer Playback...") - (0 ":alice!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:28] tester, welcome!") - (0 ":bob!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:28] tester, welcome!") - (0 ":bob!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:29] alice: Pardon, sir; error: he is not quantity enough for that Worthy's thumb: he is not so big as the end of his club.") - (0 ":alice!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:34] bob: Go, fetch him hither: let me look upon him.") - (0 ":bob!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:37] alice: Over-roasted rather; ready long ago.") - (0 ":alice!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:39] bob: Sir, there is especial commission come from Venice to depute Cassio in Othello's place.") - (0 ":bob!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:41] alice: In any proportion or in any language.") - (0 ":alice!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:46] bob: Come, bring them away: if these be good people in a common-weal that do nothing but use their abuses in common houses, I know no law: bring them away.") - (0 ":bob!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:51] alice: Wish'd himself the heaven's breath.") - (0 ":alice!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:53] bob: My general will forget my love and service.") - (0 ":bob!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:55] alice: Madam, all joy befall your Grace.") - (0 ":alice!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:23:58] bob: To be suspected; framed to make women false.") - (0 ":bob!~u@8cgjyczyrjgby.irc PRIVMSG #foo :[10:24:00] alice: Ay, of my pigeons, sir; nothing else.") + (0 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #foo :[07:02:41] bob: To-morrow is the joyful day, Audrey; to-morrow will we be married.") + (0 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #foo :[07:02:44] alice: Why dost thou call them knaves ? thou know'st them not.") + (0 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #foo :[07:03:05] bob: Now, by the faith of my love, I will: tell me where it is.") + (0 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #foo :[07:03:09] alice: Give me the letter; I will look on it.") (0 ":***!znc@znc.in PRIVMSG #foo :Playback Complete.") - (0 ":irc.foonet.org NOTICE tester :[11:29:00] 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 10 "MODE #foo") +((mode 8 "MODE #foo") (0 ":irc.foonet.org 324 tester #foo +nt") - (0 ":irc.foonet.org 329 tester #foo 1616149403") - (0.1 ":alice!~u@8cgjyczyrjgby.irc PRIVMSG #foo :bob: To old Free-town, our common judgment-place.") - (0.1 ":bob!~u@8cgjyczyrjgby.irc PRIVMSG #foo :alice: To ask of whence you are: report it.")) + (0 ":irc.foonet.org 329 tester #foo 1619593200") + (0.1 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #foo :bob: By this hand, it will not kill a fly. But come, now I will be your Rosalind in a more coming-on disposition; and ask me what you will, I will grant it.") + (0.1 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #foo :alice: That I must love a loathed enemy.") + (0.1 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #foo :bob: His discretion, I am sure, cannot carry his valour, for the goose carries not the fox. It is well: leave it to his discretion, and let us listen to the moon.") + (0.1 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #foo :alice: As living here and you no use of him.")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/gapless-connect/pass-stub.lispdata b/test/lisp/erc/erc-scenarios-resources/base/gapless-connect/pass-stub.lispdata new file mode 100644 index 0000000000..0c8dfd19d0 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/gapless-connect/pass-stub.lispdata @@ -0,0 +1,4 @@ +;; -*- mode: lisp-data; -*- +((pass 3 "PASS :" token ":changeme")) + +((fake 1 "FAKE no op")) diff --git a/test/lisp/erc/erc-scenarios-resources/47522/ambiguous-join/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/legacy-autojoin/foonet.lispdata similarity index 51% rename from test/lisp/erc/erc-scenarios-resources/47522/ambiguous-join/foonet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/legacy-autojoin/foonet.lispdata index 140ea34541..344ba7c1da 100644 --- a/test/lisp/erc/erc-scenarios-resources/47522/ambiguous-join/foonet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/legacy-autojoin/foonet.lispdata @@ -7,7 +7,7 @@ (0 ":irc.foonet.org 003 tester :This server was created Tue, 04 May 2021 05:06:18 UTC") (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") - (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=FooNet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") @@ -16,27 +16,23 @@ (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) + +((mode-user 3.2 "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.")) -((join 1 "JOIN #chan") - (0 ":tester!~u@9hbxjx335qjjq.irc JOIN #chan") - (0 ":irc.foonet.org 353 tester = #chan :@bob alice tester") +((join 6 "JOIN #chan") + (0 ":tester!~u@9g6b728983yd2.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :alice tester @bob") (0 ":irc.foonet.org 366 tester #chan :End of NAMES list")) -((mode 2 "MODE #chan") +((mode 5 "MODE #chan") (0 ":irc.foonet.org 324 tester #chan +nt") - (0 ":irc.foonet.org 329 tester #chan 1620175913") - (0.1 ":bob!~u@24ebq8ma57rha.irc PRIVMSG #chan :tester, welcome!") - (0.1 ":alice!~u@24ebq8ma57rha.irc PRIVMSG #chan :tester, welcome!") - (0.1 ":bob!~u@24ebq8ma57rha.irc PRIVMSG #chan :alice: Ha! now I see thou art a fool, and fit for thy master.") - (0.1 ":alice!~u@24ebq8ma57rha.irc PRIVMSG #chan :bob: Answer as I call you. Nick Bottom, the weaver.") - (0.1 ":bob!~u@24ebq8ma57rha.irc PRIVMSG #chan :alice: Have lost a brace of kinsmen: all are punish'd.") - (0.1 ":alice!~u@24ebq8ma57rha.irc PRIVMSG #chan :bob: Truly, thou art damned like an ill-roasted egg, all on one side.") - (0.1 ":bob!~u@24ebq8ma57rha.irc PRIVMSG #chan :alice: Thou wouldst else have made thy tale large.") - (0.1 ":alice!~u@24ebq8ma57rha.irc PRIVMSG #chan :bob: And even for that do I love you the more.") - (0.1 ":bob!~u@24ebq8ma57rha.irc PRIVMSG #chan :alice: And let my spleenful sons this trull deflower.") - (0.1 ":alice!~u@24ebq8ma57rha.irc PRIVMSG #chan :bob: Truly, and to cast away honesty upon a foul slut were to put good meat into an unclean dish.") - (0.1 ":bob!~u@24ebq8ma57rha.irc PRIVMSG #chan :alice: Come, let's away; the strangers are all gone.") - (0.1 ":alice!~u@24ebq8ma57rha.irc PRIVMSG #chan :bob: You shall find of the king a husband, madam; you, sir, a father. He that so generally is at all times good, must of necessity hold his virtue to you, whose worthiness would stir it up where it wanted rather than lack it where there is such abundance.")) + (0 ":irc.foonet.org 329 tester #chan 1620104779") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :tester, welcome!") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: But, as it seems, did violence on herself.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: Well, this is the forest of Arden.") + (0.1 ":alice!~u@rz2v467q4rwhy.irc PRIVMSG #chan :bob: And will you, being a man of your breeding, be married under a bush, like a beggar ? Get you to church, and have a good priest that can tell you what marriage is: this fellow will but join you together as they join wainscot; then one of you will prove a shrunk panel, and like green timber, warp, warp.") + (0.1 ":bob!~u@rz2v467q4rwhy.irc PRIVMSG #chan :alice: Live, and be prosperous; and farewell, good fellow.")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/reconnect-timer/foonet-last.lispdata b/test/lisp/erc/erc-scenarios-resources/base/reconnect-timer/foonet-last.lispdata new file mode 100644 index 0000000000..3a1f303101 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/reconnect-timer/foonet-last.lispdata @@ -0,0 +1,5 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.znc.in 464 tester :Invalid Password")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/reconnect-timer/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/reconnect-timer/foonet.lispdata new file mode 100644 index 0000000000..95c6af8d88 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/reconnect-timer/foonet.lispdata @@ -0,0 +1,6 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.znc.in 464 tester :Invalid Password")) +((drop 0 DROP)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/renick/queries/bouncer-barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/renick/queries/bouncer-barnet.lispdata new file mode 100644 index 0000000000..9755920f37 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/renick/queries/bouncer-barnet.lispdata @@ -0,0 +1,54 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :barnet:changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") + (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.barnet.org 003 tester :This server was created Tue, 01 Jun 2021 07:49:23 UTC") + (0 ":irc.barnet.org 004 tester irc.barnet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.barnet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.barnet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=barnet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.barnet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.barnet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.barnet.org 252 tester 0 :IRC Operators online") + (0 ":irc.barnet.org 254 tester 1 :channels formed") + (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") + (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") + ;; No mode answer + (0 ":irc.znc.in 306 tester :You have been marked as being away") + (0 ":tester!~u@286u8jcpis84e.irc JOIN #chan") + (0 ":irc.barnet.org 353 tester = #chan :@joe mike rando tester") + (0 ":irc.barnet.org 366 tester #chan :End of /NAMES list.") + (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") + (0 ":joe!~u@286u8jcpis84e.irc PRIVMSG #chan :[09:19:19] mike: Chi non te vede, non te pretia.") + (0 ":mike!~u@286u8jcpis84e.irc PRIVMSG #chan :[09:19:28] joe: The valiant heart's not whipt out of his trade.") + (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") + (0 ":rando!~u@95i756tt32ym8.irc PRIVMSG tester :[09:18:20] Why'd you pull that scene at the arcade?") + (0 ":rando!~u@95i756tt32ym8.irc PRIVMSG tester :[09:18:32] I had to mess up this rentacop came after me with nunchucks.") + (0 ":irc.barnet.org NOTICE tester :[09:13:24] 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 1 "MODE #chan") + (0 ":irc.barnet.org 324 tester #chan +nt") + (0 ":irc.barnet.org 329 tester #chan 1622538742") + (0.1 ":joe!~u@286u8jcpis84e.irc PRIVMSG #chan :mike: By favours several which they did bestow.") + (0.1 ":mike!~u@286u8jcpis84e.irc PRIVMSG #chan :joe: You, Roderigo! come, sir, I am for you.")) + +((privmsg-a 5 "PRIVMSG rando :Linda said you were gonna kill me.") + (0.1 ":joe!~u@286u8jcpis84e.irc PRIVMSG #chan :mike: Play, music, then! Nay, you must do it soon.") + (0.1 ":rando!~u@95i756tt32ym8.irc PRIVMSG tester :Linda said? I never saw her before I came up here.") + (0.1 ":mike!~u@286u8jcpis84e.irc PRIVMSG #chan :joe: Of arts inhibited and out of warrant.")) + +((privmsg-b 3 "PRIVMSG rando :You aren't with Wage?") + (0.1 ":joe!~u@286u8jcpis84e.irc PRIVMSG #chan :mike: But most of all, agreeing with the proclamation.") + (0.1 ":rando!~u@95i756tt32ym8.irc PRIVMSG tester :I think you screwed up, Case.") + (0.1 ":mike!~u@286u8jcpis84e.irc PRIVMSG #chan :joe: Good gentleman, go your gait, and let poor volk pass. An chud ha' bin zwaggered out of my life, 'twould not ha' bin zo long as 'tis by a vortnight. Nay, come not near th' old man; keep out, che vor ye, or ise try whether your costard or my ballow be the harder. Chill be plain with you.") + ;; Nick change + (0.1 ":rando!~u@95i756tt32ym8.irc NICK frenemy") + (0.1 ":joe!~u@286u8jcpis84e.irc PRIVMSG #chan :mike: Till time beget some careful remedy.") + (0.1 ":frenemy!~u@95i756tt32ym8.irc PRIVMSG tester :I showed up and you just fit me right into your reality picture.") + (0.1 ":mike!~u@286u8jcpis84e.irc PRIVMSG #chan :joe: For I have lost him on a dangerous sea.")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/renick/queries/bouncer-foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/renick/queries/bouncer-foonet.lispdata new file mode 100644 index 0000000000..0af67935a5 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/renick/queries/bouncer-foonet.lispdata @@ -0,0 +1,52 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :foonet:changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Tue, 01 Jun 2021 07:49:22 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (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") + ;; No mode answer + (0 ":irc.znc.in 306 tester :You have been marked as being away") + (0 ":tester!~u@u4mvbswyw8gbg.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :alice @bob rando tester") + (0 ":irc.foonet.org 366 tester #chan :End of /NAMES list.") + (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") + (0 ":bob!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :[09:19:28] alice: Great men should drink with harness on their throats.") + (0 ":alice!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :[09:19:31] bob: Your lips will feel them the sooner: shallow again. A more sounder instance; come.") + (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") + (0 ":rando!~u@bivkhq8yav938.irc PRIVMSG tester :[09:17:51] u thur?") + (0 ":rando!~u@bivkhq8yav938.irc PRIVMSG tester :[09:17:58] guess not") + (0 ":irc.foonet.org NOTICE tester :[09:12:53] 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 1 "MODE #chan") + (0 ":irc.foonet.org 324 tester #chan +nt") + (0 ":irc.foonet.org 329 tester #chan 1622538742") + (0.1 ":bob!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :alice: When there is nothing living but thee, thou shalt be welcome. I had rather be a beggar's dog than Apemantus.") + (0.1 ":alice!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :bob: You have simply misused our sex in your love-prate: we must have your doublot and hose plucked over your head, and show the world what the bird hath done to her own nest.")) + +((privmsg-a 3 "PRIVMSG rando :I here") + (0.1 ":bob!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :alice: And I will make thee think thy swan a crow.") + (0.1 ":rando!~u@bivkhq8yav938.irc PRIVMSG tester :u are dumb") + (0.1 ":alice!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :bob: Lie not, to say mine eyes are murderers.")) + +((privmsg-b 3 "PRIVMSG rando :not so") + (0.1 ":bob!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :alice: Commit myself, my person, and the cause.") + ;; Nick change + (0.1 ":rando!~u@bivkhq8yav938.irc NICK frenemy") + (0.1 ":alice!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :bob: Of raging waste! It cannot hold; it will not.") + (0.1 ":frenemy!~u@bivkhq8yav938.irc PRIVMSG tester :doubly so") + (0.1 ":bob!~u@u4mvbswyw8gbg.irc PRIVMSG #chan :alice: These words are razors to my wounded heart.")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/renick/queries/solo.lispdata b/test/lisp/erc/erc-scenarios-resources/base/renick/queries/solo.lispdata new file mode 100644 index 0000000000..b3189871aa --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/renick/queries/solo.lispdata @@ -0,0 +1,55 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :foonet:changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Mon, 31 May 2021 09:56:24 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 4 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 254 tester 2 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 4 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 4 4 :Current local users 4, max 4") + (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") + ;; No mode answer + (0 ":irc.znc.in 306 tester :You have been marked as being away") + (0 ":tester!~u@gq7yjr7gsu7nn.irc JOIN #foo") + (0 ":irc.foonet.org 353 tester = #foo :alice @bob Lal tester") + (0 ":irc.foonet.org 366 tester #foo :End of /NAMES list.") + (0 ":***!znc@znc.in PRIVMSG #foo :Buffer Playback...") + (0 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :[10:00:02] bob: All that he is hath reference to your highness.") + (0 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :[10:00:06] alice: Excellent workman! Thou canst not paint a man so bad as is thyself.") + (0 ":***!znc@znc.in PRIVMSG #foo :Playback Complete.") + (0 ":irc.foonet.org NOTICE tester :[09:56:57] 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 1 "MODE #foo") + (0 ":irc.foonet.org 324 tester #foo +nt") + (0 ":irc.foonet.org 329 tester #foo 1622454985") + (0.1 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :bob: Farewell, pretty lady: you must hold the credit of your father.") + (0.1 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :alice: On Thursday, sir ? the time is very short.")) + +((privmsg-a 10 "PRIVMSG #foo :hi") + (0.2 ":Lal!~u@b82mytupn2t5k.irc PRIVMSG tester :hello") + (0.2 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :alice: And brought to yoke, the enemies of Rome.") + (0.2 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :bob: Thou art thy father's daughter; there's enough.")) + +((privmsg-b 10 "PRIVMSG Lal :hi") + (0.2 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :alice: Here are the beetle brows shall blush for me.") + (0.2 ":Lal!~u@b82mytupn2t5k.irc NICK Linguo") + (0.2 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :bob: He hath abandoned his physicians, madam; under whose practices he hath persecuted time with hope, and finds no other advantage in the process but only the losing of hope by time.")) + +((privmsg-c 10 "PRIVMSG Linguo :howdy Linguo") + (0.1 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :alice: And brought to yoke, the enemies of Rome.") + (0.2 ":Linguo!~u@b82mytupn2t5k.irc PART #foo")) + +((part 10 "PART #foo :\2ERC\2") + (0 ":tester!~u@gq7yjr7gsu7nn.irc PART #foo :\2ERC\2") + (0.1 ":Linguo!~u@b82mytupn2t5k.irc PRIVMSG tester :get along little doggie")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/renick/self/auto.lispdata b/test/lisp/erc/erc-scenarios-resources/base/renick/self/auto.lispdata new file mode 100644 index 0000000000..5b9c26738d --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/renick/self/auto.lispdata @@ -0,0 +1,46 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :foonet:changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the FooNet Internet Relay Chat Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org[188.240.145.101/6697], running version solanum-1.0-dev") + (0 ":irc.foonet.org 003 tester :This server was created Sat May 22 2021 at 19:04:17 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org solanum-1.0-dev DGQRSZaghilopsuwz CFILMPQSbcefgijklmnopqrstuvz bkloveqjfI") + (0 ":irc.foonet.org 005 tester WHOX FNC KNOCK SAFELIST ELIST=CTU CALLERID=g MONITOR=100 ETRACE CHANTYPES=# EXCEPTS INVEX CHANMODES=eIbq,k,flj,CFLMPQScgimnprstuz :are supported by this server") + (0 ":irc.foonet.org 005 tester CHANLIMIT=#:250 PREFIX=(ov)@+ MAXLIST=bqeI:100 MODES=4 NETWORK=foonet STATUSMSG=@+ CASEMAPPING=rfc1459 NICKLEN=16 MAXNICKLEN=16 CHANNELLEN=50 TOPICLEN=390 DEAF=D :are supported by this server") + (0 ":irc.foonet.org 005 tester TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,PRIVMSG:4,NOTICE:4,ACCEPT:,MONITOR: EXTBAN=$,ajrxz CLIENTVER=3.0 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 33 users and 14113 invisible on 17 servers") + (0 ":irc.foonet.org 252 tester 34 :IRC Operators online") + (0 ":irc.foonet.org 254 tester 12815 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 726 clients and 1 servers") + (0 ":irc.foonet.org 265 tester 726 739 :Current local users 726, max 739") + (0 ":irc.foonet.org 266 tester 14146 14541 :Current global users 14146, max 14541") + (0 ":irc.foonet.org 250 tester :Highest connection count: 740 (739 clients) (3790 connections received)") + (0 ":tester!~u@gq7yjr7gsu7nn.irc NICK :dummy") + (0 ":irc.foonet.org 375 dummy :- irc.foonet.org Message of the Day - ") + (0 ":irc.foonet.org 372 dummy :- This server provided by NORDUnet/SUNET") + (0 ":irc.foonet.org 372 dummy :- Welcome to foonet, the IRC network for free & open-source software") + (0 ":irc.foonet.org 372 dummy :- and peer directed projects.") + (0 ":irc.foonet.org 372 dummy :- ") + (0 ":irc.foonet.org 372 dummy :- Please visit us in #libera for questions and support.") + (0 ":irc.foonet.org 376 dummy :End of /MOTD command.")) + +((mode-user 1.2 "MODE dummy +i") + (0 ":dummy!~u@gq7yjr7gsu7nn.irc MODE dummy :+RZi") + (0 ":irc.znc.in 306 dummy :You have been marked as being away") + (0 ":dummy!~u@gq7yjr7gsu7nn.irc JOIN #foo") + + (0 ":irc.foonet.org 353 dummy = #foo :alice @bob Lal dummy") + (0 ":irc.foonet.org 366 dummy #foo :End of /NAMES list.") + (0 ":***!znc@znc.in PRIVMSG #foo :Buffer Playback...") + (0 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :[10:00:02] bob: All that he is hath reference to your highness.") + (0 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :[10:00:06] alice: Excellent workman! Thou canst not paint a man so bad as is thyself.") + (0 ":***!znc@znc.in PRIVMSG #foo :Playback Complete.") + (0 ":irc.foonet.org NOTICE dummy :[09:56:57] 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 dummy :You are no longer marked as being away")) + +((mode 1 "MODE #foo") + (0 ":irc.foonet.org 324 dummy #foo +nt") + (0 ":irc.foonet.org 329 dummy #foo 1622454985") + (0.1 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :bob: Farewell, pretty lady: you must hold the credit of your father.") + (0.1 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :alice: On Thursday, sir ? the time is very short.")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/renick/self/manual.lispdata b/test/lisp/erc/erc-scenarios-resources/base/renick/self/manual.lispdata new file mode 100644 index 0000000000..dd107b806d --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/renick/self/manual.lispdata @@ -0,0 +1,50 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :foonet:changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the FooNet Internet Relay Chat Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org[188.240.145.101/6697], running version solanum-1.0-dev") + (0 ":irc.foonet.org 003 tester :This server was created Sat May 22 2021 at 19:04:17 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org solanum-1.0-dev DGQRSZaghilopsuwz CFILMPQSbcefgijklmnopqrstuvz bkloveqjfI") + (0 ":irc.foonet.org 005 tester WHOX FNC KNOCK SAFELIST ELIST=CTU CALLERID=g MONITOR=100 ETRACE CHANTYPES=# EXCEPTS INVEX CHANMODES=eIbq,k,flj,CFLMPQScgimnprstuz :are supported by this server") + (0 ":irc.foonet.org 005 tester CHANLIMIT=#:250 PREFIX=(ov)@+ MAXLIST=bqeI:100 MODES=4 NETWORK=foonet STATUSMSG=@+ CASEMAPPING=rfc1459 NICKLEN=16 MAXNICKLEN=16 CHANNELLEN=50 TOPICLEN=390 DEAF=D :are supported by this server") + (0 ":irc.foonet.org 005 tester TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,PRIVMSG:4,NOTICE:4,ACCEPT:,MONITOR: EXTBAN=$,ajrxz CLIENTVER=3.0 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 33 users and 14113 invisible on 17 servers") + (0 ":irc.foonet.org 252 tester 34 :IRC Operators online") + (0 ":irc.foonet.org 254 tester 12815 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 726 clients and 1 servers") + (0 ":irc.foonet.org 265 tester 726 739 :Current local users 726, max 739") + (0 ":irc.foonet.org 266 tester 14146 14541 :Current global users 14146, max 14541") + (0 ":irc.foonet.org 250 tester :Highest connection count: 740 (739 clients) (3790 connections received)") + (0 ":irc.foonet.org 375 tester :- irc.foonet.org Message of the Day - ") + (0 ":irc.foonet.org 372 tester :- This server provided by NORDUnet/SUNET") + (0 ":irc.foonet.org 372 tester :- Welcome to foonet, the IRC network for free & open-source software") + (0 ":irc.foonet.org 372 tester :- and peer directed projects.") + (0 ":irc.foonet.org 372 tester :- ") + (0 ":irc.foonet.org 372 tester :- Please visit us in #libera for questions and support.") + (0 ":irc.foonet.org 376 tester :End of /MOTD command.")) + +((mode-user 1.2 "MODE tester +i") + (0 ":tester!~u@gq7yjr7gsu7nn.irc MODE tester :+RZi") + (0 ":irc.znc.in 306 tester :You have been marked as being away") + (0 ":tester!~u@gq7yjr7gsu7nn.irc JOIN #foo") + + (0 ":irc.foonet.org 353 tester = #foo :alice @bob Lal tester") + (0 ":irc.foonet.org 366 tester #foo :End of /NAMES list.") + (0 ":***!znc@znc.in PRIVMSG #foo :Buffer Playback...") + (0 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :[10:00:02] bob: All that he is hath reference to your highness.") + (0 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :[10:00:06] alice: Excellent workman! Thou canst not paint a man so bad as is thyself.") + (0 ":***!znc@znc.in PRIVMSG #foo :Playback Complete.") + (0 ":irc.foonet.org NOTICE tester :[09:56:57] 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 1 "MODE #foo") + (0 ":irc.foonet.org 324 tester #foo +nt") + (0 ":irc.foonet.org 329 tester #foo 1622454985") + (0.1 ":alice!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :bob: Farewell, pretty lady: you must hold the credit of your father.") + (0.1 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :alice: On Thursday, sir ? the time is very short.")) + +((nick 2 "NICK dummy") + (0 ":tester!~u@gq7yjr7gsu7nn.irc NICK :dummy") + (0.1 ":dummy!~u@gq7yjr7gsu7nn.irc MODE dummy :+RZi") + (0.1 ":bob!~u@gq7yjr7gsu7nn.irc PRIVMSG #foo :dummy: Hi.")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/renick/self/qual-chester.lispdata b/test/lisp/erc/erc-scenarios-resources/base/renick/self/qual-chester.lispdata new file mode 100644 index 0000000000..75b50fe68b --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/renick/self/qual-chester.lispdata @@ -0,0 +1,40 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK chester")) +((user 1 "USER user 0 * :chester") + (0 ":irc.foonet.org 001 chester :Welcome to the foonet IRC Network chester") + (0 ":irc.foonet.org 002 chester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 chester :This server was created Sun, 13 Jun 2021 05:45:20 UTC") + (0 ":irc.foonet.org 004 chester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 chester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 chester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 chester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 chester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 chester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 chester 1 :unregistered connections") + (0 ":irc.foonet.org 254 chester 1 :channels formed") + (0 ":irc.foonet.org 255 chester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 chester 3 4 :Current local users 3, max 4") + (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") + (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.")) + +((join 14 "JOIN #chan") + (0 ":chester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0 ":irc.foonet.org 353 chester = #chan :tester chester @alice bob") + (0 ":irc.foonet.org 366 chester #chan :End of NAMES list")) + +((mode 10 "MODE #chan") + (0.0 ":irc.foonet.org 324 chester #chan +nt") + (0.0 ":irc.foonet.org 329 chester #chan 1623563121") + (0.0 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.0 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0 ":tester!~u@gq7yjr7gsu7nn.irc NICK :dummy") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: That ever eye with sight made heart lament.") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: The bitter past, more welcome is the sweet.") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: Dispatch, I say, and find the forester.")) + +((linger 10 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/renick/self/qual-tester.lispdata b/test/lisp/erc/erc-scenarios-resources/base/renick/self/qual-tester.lispdata new file mode 100644 index 0000000000..2519922665 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/renick/self/qual-tester.lispdata @@ -0,0 +1,46 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Sun, 13 Jun 2021 05:45:20 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 4 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 4 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 4 4 :Current local users 4, max 4") + (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") + (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.")) + +((join 15 "JOIN #chan") + (0 ":tester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :tester @alice bob") + (0 ":irc.foonet.org 366 tester #chan :End of NAMES list")) + +((mode 10 "MODE #chan") + (0.0 ":irc.foonet.org 324 tester #chan +nt") + (0.0 ":irc.foonet.org 329 tester #chan 1623563121") + (0.0 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome!") + (0.0 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: Marry, that, I think, be young Petruchio.") + (0.4 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: You speak of him when he was less furnished than now he is with that which makes him both without and within.") + (0.2 ":chester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!")) + +((nick 5 "NICK dummy") + (0 ":tester!~u@gq7yjr7gsu7nn.irc NICK :dummy") + (0.1 ":dummy!~u@gq7yjr7gsu7nn.irc MODE dummy :+RZi") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: That ever eye with sight made heart lament.") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: The bitter past, more welcome is the sweet.") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: Dispatch, I say, and find the forester.")) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/reuseless/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/reuse-buffers/server-buffers/barnet.lispdata similarity index 92% rename from test/lisp/erc/erc-scenarios-resources/48598/rebuffed/reuseless/barnet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/reuse-buffers/server-buffers/barnet.lispdata index 1e30e9e0b2..2c4264c746 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/reuseless/barnet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/reuse-buffers/server-buffers/barnet.lispdata @@ -1,8 +1,7 @@ ;; -*- mode: lisp-data; -*- ((pass 1 "PASS :barnet:changeme")) ((nick 1 "NICK tester")) - -((~user 2 "USER user 0 * :tester") +((user 2 "USER user 0 * :tester") (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.6.0-7481bf0385b95b16") (0 ":irc.barnet.org 003 tester :This server was created Sun, 25 Apr 2021 11:28:28 UTC") @@ -16,9 +15,10 @@ (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") + (0 ":irc.barnet.org 422 tester :MOTD File is missing")) + +((mode-user 1.2 "MODE tester +i") + ;; No mode answer (0 ":irc.znc.in 306 tester :You have been marked as being away") (0 ":irc.barnet.org NOTICE tester :[11:29:00] 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")) - -((~eof 2 EOF)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/reuseless/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/reuse-buffers/server-buffers/foonet.lispdata similarity index 94% rename from test/lisp/erc/erc-scenarios-resources/48598/rebuffed/reuseless/foonet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/reuse-buffers/server-buffers/foonet.lispdata index 7952fb1d6e..2a8418eecf 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/rebuffed/reuseless/foonet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/reuse-buffers/server-buffers/foonet.lispdata @@ -15,7 +15,10 @@ (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) + +((mode-user 1.2 "MODE tester +i") + ;; No mode answer (0 ":irc.znc.in 306 tester :You have been marked as being away") (0 ":irc.foonet.org NOTICE tester :[11:29:00] 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")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet-again.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet-again.lispdata new file mode 100644 index 0000000000..62d17692cf --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet-again.lispdata @@ -0,0 +1,50 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :barnet:changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") + (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.barnet.org 003 tester :This server was created Wed, 12 May 2021 07:41:08 UTC") + (0 ":irc.barnet.org 004 tester irc.barnet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.barnet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.barnet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=barnet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.barnet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.barnet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.barnet.org 252 tester 0 :IRC Operators online") + (0 ":irc.barnet.org 254 tester 1 :channels formed") + (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") + (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 2.2 "MODE tester +i") + ;; No mode answer ^ + + (0 ":tester!~u@xrir8fpe4d7ak.irc JOIN #chan") + (0 ":irc.barnet.org 353 tester = #chan :joe @mike tester") + (0 ":irc.barnet.org 366 tester #chan :End of /NAMES list.") + (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") + (0 ":joe!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :[07:04:25] mike: Belike, for joy the emperor hath a son.") + (0 ":mike!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :[07:04:27] joe: Protest their first of manhood.") + (0 ":joe!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :[07:04:29] mike: As frozen water to a starved snake.") + (0 ":mike!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :[07:04:34] joe: My mirth it much displeas'd, but pleas'd my woe.") + (0 ":joe!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :[07:04:38] mike: Why, Marcus, no man should be mad but I.") + (0 ":mike!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :[07:04:44] joe: Faith, I have heard too much, for your words and performances are no kin together.") + (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") + (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.znc.in 306 tester :You have been marked as being away") + (0 ":irc.barnet.org 305 tester :You are no longer marked as being away")) + +((~join 3 "JOIN #chan")) + +((mode 2 "MODE #chan") + (0 ":irc.barnet.org 324 tester #chan +nt") + (0 ":irc.barnet.org 329 tester #chan 1620805269") + (0.1 ":joe!~u@svpn88yjcdj42.irc PRIVMSG #chan :mike: But, in defence, by mercy, 'tis most just.") + (0.1 ":mike!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :joe: The Marshal of France, Monsieur la Far.") + (0.1 ":joe!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :mike: And bide the penance of each three years' day.") + (0.1 ":mike!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :joe: Madam, within; but never man so chang'd.") + (0.1 ":joe!~u@xrir8fpe4d7ak.irc PRIVMSG #chan :mike: As much in private, and I'll bid adieu.")) + +((linger 4 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet-drop.lispdata similarity index 55% rename from test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/barnet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet-drop.lispdata index c5b18cea3f..9b5edd6208 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/autojoin/barnet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet-drop.lispdata @@ -1,10 +1,10 @@ ;; -*- mode: lisp-data; -*- -((pass 2 "PASS :barnet:changeme")) -((nick 2 "NICK tester")) +((pass 1 "PASS :barnet:changeme")) +((nick 1 "NICK tester")) ((user 1 "USER user 0 * :tester") (0 ":irc.barnet.org 001 tester :Welcome to the barnet IRC Network tester") (0 ":irc.barnet.org 002 tester :Your host is irc.barnet.org, running version oragono-2.6.0-7481bf0385b95b16") - (0 ":irc.barnet.org 003 tester :This server was created Mon, 10 May 2021 00:58:22 UTC") + (0 ":irc.barnet.org 003 tester :This server was created Wed, 12 May 2021 07:41:08 UTC") (0 ":irc.barnet.org 004 tester irc.barnet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") (0 ":irc.barnet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") (0 ":irc.barnet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=barnet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") @@ -17,24 +17,25 @@ (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3") (0 ":irc.barnet.org 422 tester :MOTD File is missing")) -((join 2 "JOIN #chan") - (0 ":tester!~u@6yximxrnkg65a.irc JOIN #chan") +((mode-user 1.2 "MODE tester +i") + ;; No mode answer ^ + (0 ":irc.znc.in 306 tester :You have been marked as being away") + (0 ":irc.barnet.org 305 tester :You are no longer marked as being away")) + +((join 1 "JOIN #chan") + (0 ":tester!~u@awyxgybtkx7uq.irc JOIN #chan") (0 ":irc.barnet.org 353 tester = #chan :@joe mike tester") (0 ":irc.barnet.org 366 tester #chan :End of NAMES list") - (0.1 ":joe!~u@6yximxrnkg65a.irc PRIVMSG #chan :tester, welcome!") - (0 ":mike!~u@6yximxrnkg65a.irc PRIVMSG #chan :tester, welcome!")) + (0.1 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :tester, welcome!") + (0 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :tester, welcome!")) ((mode 1 "MODE #chan") (0 ":irc.barnet.org 324 tester #chan +nt") - (0 ":irc.barnet.org 329 tester #chan 1620608304") - ;; Wait for foonet's buffer playback - (0.1 ":mike!~u@6yximxrnkg65a.irc PRIVMSG #chan :joe: Go take her hence, and marry her instantly.") - (0.1 ":joe!~u@6yximxrnkg65a.irc PRIVMSG #chan :mike: Of all the four, or the three, or the two, or one of the four.") - (0.1 ":mike!~u@6yximxrnkg65a.irc PRIVMSG #chan :joe: And gives the crutch the cradle's infancy.") - (0.1 ":joe!~u@6yximxrnkg65a.irc PRIVMSG #chan :mike: Such is the simplicity of man to hearken after the flesh.") - (0.05 ":mike!~u@6yximxrnkg65a.irc PRIVMSG #chan :joe: The leaf to read them. Let us toward the king.") - (0.05 ":joe!~u@6yximxrnkg65a.irc PRIVMSG #chan :mike: Many can brook the weather that love not the wind.") - (0.05 ":mike!~u@6yximxrnkg65a.irc PRIVMSG #chan :joe: And now, dear maid, be you as free to us.") - (0.00 ":joe!~u@6yximxrnkg65a.irc PRIVMSG #chan :mike: He hath an uncle here in Messina will be very much glad of it.")) + (0 ":irc.barnet.org 329 tester #chan 1620805269") + (0.1 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: But you have outfaced them all.") + (0.1 ":joe!~u@awyxgybtkx7uq.irc PRIVMSG #chan :mike: Why, will shall break it; will, and nothing else.") + (0.1 ":mike!~u@awyxgybtkx7uq.irc PRIVMSG #chan :joe: Yes, a dozen; and as many to the vantage, as would store the world they played for.") + (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 dishonour in doing it.")) -((linger 3.5 LINGER)) +((drop 0 DROP)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/rename-buffers/barnet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet.lispdata similarity index 96% rename from test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/rename-buffers/barnet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet.lispdata index 4c2e9f209b..720e7cf8c8 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/rename-buffers/barnet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/barnet.lispdata @@ -15,7 +15,10 @@ (0 ":irc.barnet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.barnet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.barnet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.barnet.org 422 tester :MOTD File is missing") + (0 ":irc.barnet.org 422 tester :MOTD File is missing")) + +((mode-user 1.2 "MODE tester +i") + ;; No mode answer ^ (0 ":irc.znc.in 306 tester :You have been marked as being away") (0 ":irc.barnet.org 305 tester :You are no longer marked as being away")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet-again.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet-again.lispdata new file mode 100644 index 0000000000..b99beafc4b --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet-again.lispdata @@ -0,0 +1,50 @@ +;; -*- mode: lisp-data; -*- +((pass 3 "PASS :foonet:changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Wed, 12 May 2021 07:41:09 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (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 2.2 "MODE tester +i") + ;; No mode answer ^ + (0 ":tester!~u@nvfhxvqm92rm6.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :alice @bob tester") + (0 ":irc.foonet.org 366 tester #chan :End of /NAMES list.") + (0 ":***!znc@znc.in PRIVMSG #chan :Buffer Playback...") + (0 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #chan :[07:04:02] alice: Here come the lovers, full of joy and mirth.") + (0 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #chan :[07:04:07] bob: According to the fool's bolt, sir, and such dulcet diseases.") + (0 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #chan :[07:04:10] alice: And hang himself. I pray you, do my greeting.") + (0 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #chan :[07:04:18] bob: And you sat smiling at his cruel prey.") + (0 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #chan :[07:04:21] alice: Or never after look me in the face.") + (0 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #chan :[07:04:25] bob: If that may be, than all is well. Come, sit down, every mother's son, and rehearse your parts. Pyramus, you begin: when you have spoken your speech, enter into that brake; and so every one according to his cue.") + (0 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #chan :[07:04:30] alice: Where I espied the panther fast asleep.") + (0 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #chan :[07:04:32] bob: Alas! he is too young: yet he looks successfully.") + (0 ":***!znc@znc.in PRIVMSG #chan :Playback Complete.") + + (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")) + +((~join 3 "JOIN #chan")) + +((mode 3 "MODE #chan") + (0 ":irc.foonet.org 324 tester #chan +nt") + (0 ":irc.foonet.org 329 tester #chan 1620805271") + (0.1 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #chan :bob: Grows, lives, and dies, in single blessedness.") + (0.1 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #chan :alice: For these two hours, Rosalind, I will leave thee.") + (0.1 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #chan :bob: By this hand, it will not kill a fly. But come, now I will be your Rosalind in a more coming-on disposition; and ask me what you will, I will grant it.") + (0.1 ":bob!~u@svpn88yjcdj42.irc PRIVMSG #chan :alice: That I must love a loathed enemy.") + (0.1 ":alice!~u@svpn88yjcdj42.irc PRIVMSG #chan :bob: As't please your lordship: I'll leave you.")) + +((linger 3 LINGER)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet-drop.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet-drop.lispdata new file mode 100644 index 0000000000..630742603e --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet-drop.lispdata @@ -0,0 +1,46 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :foonet:changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Wed, 12 May 2021 07:41:09 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") + (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") + ;; No mode answer ^ + (0 ":irc.znc.in 306 tester :You have been marked as being away") + (0 ":irc.foonet.org 305 tester :You are no longer marked as being away")) + +((join 1 "JOIN #chan") + (0 ":tester!~u@ertp7idh9jtgi.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :@alice bob tester") + (0 ":irc.foonet.org 366 tester #chan :End of NAMES list") + (0.1 ":alice!~u@ertp7idh9jtgi.irc PRIVMSG #chan :tester, welcome!") + (0 ":bob!~u@ertp7idh9jtgi.irc PRIVMSG #chan :tester, welcome!")) + +((mode 1 "MODE #chan") + (0 ":irc.foonet.org 324 tester #chan +nt") + (0 ":irc.foonet.org 329 tester #chan 1620805271") + (0.1 ":alice!~u@ertp7idh9jtgi.irc PRIVMSG #chan :bob: He cannot be heard of. Out of doubt he is transported.") + (0.1 ":bob!~u@ertp7idh9jtgi.irc PRIVMSG #chan :alice: More evident than this; for this was stol'n.") + (0.1 ":alice!~u@ertp7idh9jtgi.irc PRIVMSG #chan :bob: Sell when you can; you are not for all markets.") + (0.1 ":bob!~u@ertp7idh9jtgi.irc PRIVMSG #chan :alice: There's the fool hangs on your back already.") + (0.1 ":alice!~u@ertp7idh9jtgi.irc PRIVMSG #chan :bob: Why, if you have a stomach to't, monsieur, if you think your mystery in stratagem can bring this instrument of honour again into its native quarter, be magnanimous in the enterprise and go on; I will grace the attempt for a worthy exploit: if you speed well in it, the duke shall both speak of it, and extend to you what further becomes his greatness, even to the utmost syllable of your worthiness.") + (0.1 ":bob!~u@ertp7idh9jtgi.irc PRIVMSG #chan :alice: For he hath still been tried a holy man.") + (0.1 ":alice!~u@ertp7idh9jtgi.irc PRIVMSG #chan :bob: To have the touches dearest priz'd.") + (0.1 ":bob!~u@ertp7idh9jtgi.irc PRIVMSG #chan :alice: And must advise the emperor for his good.") + (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.")) + +((drop 0 DROP)) diff --git a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/rename-buffers/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet.lispdata similarity index 96% rename from test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/rename-buffers/foonet.lispdata rename to test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet.lispdata index b4fcd1985a..4bbef6abc7 100644 --- a/test/lisp/erc/erc-scenarios-resources/48598/clash-of-chans/rename-buffers/foonet.lispdata +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/foonet.lispdata @@ -15,7 +15,10 @@ (0 ":irc.foonet.org 255 tester :I have 3 clients and 0 servers") (0 ":irc.foonet.org 265 tester 3 3 :Current local users 3, max 3") (0 ":irc.foonet.org 266 tester 3 3 :Current global users 3, max 3") - (0 ":irc.foonet.org 422 tester :MOTD File is missing") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) + +((mode-user 1.2 "MODE tester +i") + ;; No mode answer ^ (0 ":irc.znc.in 306 tester :You have been marked as being away") (0 ":irc.foonet.org 305 tester :You are no longer marked as being away")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/stub-again.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/stub-again.lispdata new file mode 100644 index 0000000000..0c8dfd19d0 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/bouncer/stub-again.lispdata @@ -0,0 +1,4 @@ +;; -*- mode: lisp-data; -*- +((pass 3 "PASS :" token ":changeme")) + +((fake 1 "FAKE no op")) diff --git a/test/lisp/erc/erc-scenarios-resources/base/session-id/same-network/chester.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/same-network/chester.lispdata new file mode 100644 index 0000000000..2cdc1f263f --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/same-network/chester.lispdata @@ -0,0 +1,48 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK chester")) +((user 1 "USER user 0 * :chester") + (0 ":irc.foonet.org 001 chester :Welcome to the foonet IRC Network chester") + (0 ":irc.foonet.org 002 chester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 chester :This server was created Sun, 13 Jun 2021 05:45:20 UTC") + (0 ":irc.foonet.org 004 chester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 chester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 chester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 chester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 chester :There are 0 users and 3 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 chester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 chester 1 :unregistered connections") + (0 ":irc.foonet.org 254 chester 1 :channels formed") + (0 ":irc.foonet.org 255 chester :I have 3 clients and 0 servers") + (0 ":irc.foonet.org 265 chester 3 4 :Current local users 3, max 4") + (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") + (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.")) + +((join 14 "JOIN #chan") + (0 ":chester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0 ":irc.foonet.org 353 chester = #chan :tester chester @alice bob") + (0 ":irc.foonet.org 366 chester #chan :End of NAMES list")) + +((mode 10 "MODE #chan") + (0.0 ":irc.foonet.org 324 chester #chan +nt") + (0.0 ":irc.foonet.org 329 chester #chan 1623563121") + (0.0 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.0 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: That ever eye with sight made heart lament.") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: The bitter past, more welcome is the sweet.") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: Dispatch, I say, and find the forester.") + (0.1 ":tester!~u@yuvqisyu7m7qs.irc PRIVMSG #chan :chester: hi") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: This was lofty! Now name the rest of the players. This is Ercles' vein, a tyrant's vein; a lover is more condoling.")) + +((privmsg 4 "PRIVMSG #chan :hi tester") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: As the ox hath his bow, sir, the horse his curb, and the falcon her bells, so man hath his desires; and as pigeons bill, so wedlock would be nibbling.") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: Most friendship is feigning, most loving mere folly.") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: To employ you towards this Roman. Come, our queen.")) + +((quit 5 "QUIT :" quit) + (0.0 ":tester!~u@yuvqisyu7m7qs.irc QUIT :Quit: " quit) + (0.0 ":chester!~u@yuvqisyu7m7qs.irc QUIT :Quit: " quit)) diff --git a/test/lisp/erc/erc-scenarios-resources/base/session-id/same-network/tester.lispdata b/test/lisp/erc/erc-scenarios-resources/base/session-id/same-network/tester.lispdata new file mode 100644 index 0000000000..38e505a101 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/base/session-id/same-network/tester.lispdata @@ -0,0 +1,52 @@ +;; -*- mode: lisp-data; -*- +((pass 1 "PASS :changeme")) +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the foonet IRC Network tester") + (0 ":irc.foonet.org 002 tester :Your host is irc.foonet.org, running version oragono-2.6.0-7481bf0385b95b16") + (0 ":irc.foonet.org 003 tester :This server was created Sun, 13 Jun 2021 05:45:20 UTC") + (0 ":irc.foonet.org 004 tester irc.foonet.org oragono-2.6.0-7481bf0385b95b16 BERTZios CEIMRUabefhiklmnoqstuv Iabefhkloqv") + (0 ":irc.foonet.org 005 tester AWAYLEN=390 BOT=B CASEMAPPING=ascii CHANLIMIT=#:100 CHANMODES=Ibe,k,fl,CEMRUimnstu CHANNELLEN=64 CHANTYPES=# ELIST=U EXCEPTS EXTBAN=,m FORWARD=f INVEX KICKLEN=390 :are supported by this server") + (0 ":irc.foonet.org 005 tester MAXLIST=beI:60 MAXTARGETS=4 MODES MONITOR=100 NETWORK=foonet NICKLEN=32 PREFIX=(qaohv)~&@%+ STATUSMSG=~&@%+ TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,USERHOST:10,PRIVMSG:4,TAGMSG:4,NOTICE:4,MONITOR:100 TOPICLEN=390 UTF8MAPPING=rfc8265 UTF8ONLY WHOX :are supported by this server") + (0 ":irc.foonet.org 005 tester draft/CHATHISTORY=100 :are supported by this server") + (0 ":irc.foonet.org 251 tester :There are 0 users and 4 invisible on 1 server(s)") + (0 ":irc.foonet.org 252 tester 0 :IRC Operators online") + (0 ":irc.foonet.org 253 tester 0 :unregistered connections") + (0 ":irc.foonet.org 254 tester 1 :channels formed") + (0 ":irc.foonet.org 255 tester :I have 4 clients and 0 servers") + (0 ":irc.foonet.org 265 tester 4 4 :Current local users 4, max 4") + (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") + (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.")) + +((join 15 "JOIN #chan") + (0 ":tester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0 ":irc.foonet.org 353 tester = #chan :tester @alice bob") + (0 ":irc.foonet.org 366 tester #chan :End of NAMES list")) + +((mode 10 "MODE #chan") + (0.0 ":irc.foonet.org 324 tester #chan +nt") + (0.0 ":irc.foonet.org 329 tester #chan 1623563121") + (0.0 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome!") + (0.0 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :tester, welcome!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: Marry, that, I think, be young Petruchio.") + (0.4 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: You speak of him when he was less furnished than now he is with that which makes him both without and within.") + (0.2 ":chester!~u@yuvqisyu7m7qs.irc JOIN #chan") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :chester, welcome!") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: That ever eye with sight made heart lament.") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: The bitter past, more welcome is the sweet.") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: Dispatch, I say, and find the forester.")) + +((privmsg 3 "PRIVMSG #chan :chester: hi") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: This was lofty! Now name the rest of the players. This is Ercles' vein, a tyrant's vein; a lover is more condoling.") + (0.1 ":chester!~u@yuvqisyu7m7qs.irc PRIVMSG #chan :hi tester") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: As the ox hath his bow, sir, the horse his curb, and the falcon her bells, so man hath his desires; and as pigeons bill, so wedlock would be nibbling.") + (0.1 ":alice!~u@wyb9b355rgzi8.irc PRIVMSG #chan :bob: Most friendship is feigning, most loving mere folly.") + (0.1 ":bob!~u@wyb9b355rgzi8.irc PRIVMSG #chan :alice: To employ you towards this Roman. Come, our queen.")) + +((quit 4 "QUIT :" quit) + (0 ":tester!~u@yuvqisyu7m7qs.irc QUIT :Quit: " quit)) diff --git a/test/lisp/erc/erc-scenarios-resources/networks/announced-missing/foonet.lispdata b/test/lisp/erc/erc-scenarios-resources/networks/announced-missing/foonet.lispdata new file mode 100644 index 0000000000..79b0fb462a --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/networks/announced-missing/foonet.lispdata @@ -0,0 +1,8 @@ +;; -*- mode: lisp-data; -*- +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0 ":irc.foonet.org 001 tester :Welcome to the FooNet Internet Relay Chat Network tester") + (0 ":irc.foonet.org 422 tester :MOTD File is missing")) + +((mode-user 1.2 "MODE tester +i") + (0 ":tester MODE tester :+Zi")) diff --git a/test/lisp/erc/erc-scenarios-resources/services/password/libera.lispdata b/test/lisp/erc/erc-scenarios-resources/services/password/libera.lispdata new file mode 100644 index 0000000000..c8dbc9d425 --- /dev/null +++ b/test/lisp/erc/erc-scenarios-resources/services/password/libera.lispdata @@ -0,0 +1,49 @@ +;; -*- mode: lisp-data; -*- +((nick 1 "NICK tester")) +((user 1 "USER user 0 * :tester") + (0.26 ":zirconium.libera.chat NOTICE * :*** Checking Ident") + (0.01 ":zirconium.libera.chat NOTICE * :*** Looking up your hostname...") + (0.01 ":zirconium.libera.chat NOTICE * :*** No Ident response") + (0.02 ":zirconium.libera.chat NOTICE * :*** Found your hostname: static-198-54-131-100.cust.tzulo.com") + (0.02 ":zirconium.libera.chat 001 tester :Welcome to the Libera.Chat Internet Relay Chat Network tester") + (0.01 ":zirconium.libera.chat 002 tester :Your host is zirconium.libera.chat[46.16.175.175/6697], running version solanum-1.0-dev") + (0.03 ":zirconium.libera.chat 003 tester :This server was created Wed Jun 9 2021 at 01:38:28 UTC") + (0.02 ":zirconium.libera.chat 004 tester zirconium.libera.chat solanum-1.0-dev DGQRSZaghilopsuwz CFILMPQSbcefgijklmnopqrstuvz bkloveqjfI") + (0.00 ":zirconium.libera.chat 005 tester ETRACE WHOX FNC MONITOR=100 SAFELIST ELIST=CTU CALLERID=g KNOCK CHANTYPES=# EXCEPTS INVEX CHANMODES=eIbq,k,flj,CFLMPQScgimnprstuz :are supported by this server") + (0.03 ":zirconium.libera.chat 005 tester CHANLIMIT=#:250 PREFIX=(ov)@+ MAXLIST=bqeI:100 MODES=4 NETWORK=Libera.Chat STATUSMSG=@+ CASEMAPPING=rfc1459 NICKLEN=16 MAXNICKLEN=16 CHANNELLEN=50 TOPICLEN=390 DEAF=D :are supported by this server") + (0.02 ":zirconium.libera.chat 005 tester TARGMAX=NAMES:1,LIST:1,KICK:1,WHOIS:1,PRIVMSG:4,NOTICE:4,ACCEPT:,MONITOR: EXTBAN=$,ajrxz CLIENTVER=3.0 :are supported by this server") + (0.02 ":zirconium.libera.chat 251 tester :There are 68 users and 37640 invisible on 25 servers") + (0.00 ":zirconium.libera.chat 252 tester 36 :IRC Operators online") + (0.01 ":zirconium.libera.chat 253 tester 5 :unknown connection(s)") + (0.00 ":zirconium.libera.chat 254 tester 19341 :channels formed") + (0.01 ":zirconium.libera.chat 255 tester :I have 3321 clients and 1 servers") + (0.01 ":zirconium.libera.chat 265 tester 3321 4289 :Current local users 3321, max 4289") + (0.00 ":zirconium.libera.chat 266 tester 37708 38929 :Current global users 37708, max 38929") + (0.01 ":zirconium.libera.chat 250 tester :Highest connection count: 4290 (4289 clients) (38580 connections received)") + (0.21 ":zirconium.libera.chat 375 tester :- zirconium.libera.chat Message of the Day - ") + (0.00 ":zirconium.libera.chat 372 tester :- This server provided by Seeweb ") + (0.01 ":zirconium.libera.chat 372 tester :- Welcome to Libera Chat, the IRC network for") + (0.01 ":zirconium.libera.chat 372 tester :- free & open-source software and peer directed projects.") + (0.00 ":zirconium.libera.chat 372 tester :- ") + (0.00 ":zirconium.libera.chat 372 tester :- Use of Libera Chat is governed by our network policies.") + (0.00 ":zirconium.libera.chat 372 tester :- ") + (0.01 ":zirconium.libera.chat 372 tester :- Please visit us in #libera for questions and support.") + (0.01 ":zirconium.libera.chat 372 tester :- ") + (0.01 ":zirconium.libera.chat 372 tester :- Website and documentation: https://libera.chat") + (0.01 ":zirconium.libera.chat 372 tester :- Webchat: https://web.libera.chat") + (0.01 ":zirconium.libera.chat 372 tester :- Network policies: https://libera.chat/policies") + (0.01 ":zirconium.libera.chat 372 tester :- Email: support@libera.chat") + (0.00 ":zirconium.libera.chat 376 tester :End of /MOTD command.")) + +((mode-user 1.2 "MODE tester +i") + (0.02 ":tester MODE tester :+Zi") + (0.02 ":NickServ!NickServ@services.libera.chat NOTICE tester :This nickname is registered. Please choose a different nickname, or identify via \2/msg NickServ IDENTIFY tester \2")) + +((privmsg 2 "PRIVMSG NickServ :IDENTIFY changeme") + (0.96 ":NickServ!NickServ@services.libera.chat NOTICE tester :You are now identified for \2tester\2.") + (0.25 ":NickServ!NickServ@services.libera.chat NOTICE tester :Last login from: \2~tester@school.edu/tester\2 on Jun 18 01:15:56 2021 +0000.")) + +((quit 5 "QUIT :\2ERC\2") + (0.19 ":tester!~user@static-198-54-131-100.cust.tzulo.com QUIT :Client Quit")) + +((linger 1 LINGER)) diff --git a/test/lisp/erc/erc-scenarios.el b/test/lisp/erc/erc-scenarios.el index 19d4a33fdd..f7931b35b9 100644 --- a/test/lisp/erc/erc-scenarios.el +++ b/test/lisp/erc/erc-scenarios.el @@ -1,4 +1,1679 @@ -;;; erc-scenarios.el --- e2e test cases for ERC -*- lexical-binding: t -*- +;;; erc-scenarios.el --- user test cases for ERC -*- lexical-binding: t -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. +;; +;; This file is part of GNU Emacs. +;; +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. +;; +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; . + ;;; Commentary: +;; +;; These are e2e-ish test cases primarily intended to assert core, +;; fundamental behavior expected of any modern IRC client. Tests may +;; also simulate specific scenarios drawn from bug reports. Incoming +;; messages are provided by playback scripts resembling I/O logs. In +;; place of time stamps, they have time deltas, which are used to +;; govern the test server in a fashion reminiscent of music rolls (or +;; the script(1) UNIX program). These scripts can be found in the +;; accompanying erc-scenarios-resources directory. +;; +;; Isolation: +;; +;; The set of enabled modules is shared among all tests. The function +;; `erc-update-modules' activates them (as minor modes), but it never +;; deactivates them. So there's no going back, and let-binding +;; `erc-modules' is useless. The safest route is therefore to (1) +;; assume the set of default modules is already activated or will be +;; over the course of the test session and (2) let-bind relevant user +;; options as needed. For example, to limit the damage of +;; `erc-autojoin-channels-alist' to a given test, assume the +;; `erc-join' library has already been loaded or will be on the next +;; call to `erc-open'. And then simply let-bind +;; `erc-autojoin-channels-alist' for the duration of the test. +;; +;; Playing nice: +;; +;; Right now, these tests all rely on an ugly fixture macro named +;; `erc-scenarios-common-with-cleanup', which is defined in the +;; companion file erc-scenarios-common.el. It helps restore (but not +;; really prepare) the environment by destroying any stray processes +;; or buffers named in the first argument, a `let*'-style VAR-LIST. +;; Relying on such a macro is unfortunate because in many ways it +;; actually hampers readability by favoring magic over verbosity. But +;; without it (or something similar), any failing test would cause all +;; subsequent tests in this file to fail in a cascading manner (making +;; all but the first backtrace useless). +;; +;; Misc: +;; +;; Note that in the following examples, nicknames Alice and Bob are +;; always associated with the fake network FooNet, while nicks Joe and +;; Mike are always on BarNet. +;; + ;;; Code: +(require 'ert-x) ; cl-lib + +(eval-and-compile + (let ((dir (getenv "EMACS_TEST_DIRECTORY"))) + (when dir (load (concat dir "/lisp/erc/erc-scenarios-common") nil t)))) + +(require 'erc-d) +(require 'erc-scenarios-common) +(require 'erc-backend) + +(declare-function erc-network-name "erc-networks") +(declare-function erc-network "erc-networks") +(defvar erc-autojoin-channels-alist) +(defvar erc-network) + +;; Two networks, same channel name, no confusion (no bouncer). Some +;; of this draws from bug#47522 "foil-in-server-buf". It shows that +;; disambiguation-related changes added for bug#48598 are not specific +;; to bouncers. + +(defun erc-scenarios-common--base-association-multi-net (second-join) + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/association/multi-net") + (erc-server-flood-penalty 0.1) + (erc-d-linger-secs 1) + (dumb-server-foonet-buffer (get-buffer-create "*server-foonet*")) + (dumb-server-barnet-buffer (get-buffer-create "*server-barnet*")) + (dumb-server-foonet (erc-d-run "localhost" t "server-foonet" 'foonet)) + (dumb-server-barnet (erc-d-run "localhost" t "server-barnet" 'barnet)) + (expect (erc-d-t-make-expecter))) + + (ert-info ("Connect to foonet, join #chan") + (with-current-buffer + (erc :server "127.0.0.1" + :port (process-contact dumb-server-foonet :service) + :nick "tester" + :password "changeme" + :full-name "tester") + (funcall expect 3 "debug mode") + (erc-cmd-JOIN "#chan"))) + + (erc-d-t-wait-for 2 "Buffer #chan created" (get-buffer "#chan")) + + (ert-info ("Connect to barnet, join #chan") + (with-current-buffer + (erc :server "127.0.0.1" + :port (process-contact dumb-server-barnet :service) + :nick "tester" + :password "changeme" + :full-name "tester") + (funcall expect 1 "debug mode"))) + + (funcall second-join) + + (erc-d-t-wait-for 3 "Buf #chan@barnet created" (get-buffer "#chan@barnet")) + + (erc-d-t-wait-for 2 "Buf #chan now #chan@foonet" + (and (get-buffer "#chan@foonet") (not (get-buffer "#chan")))) + + (ert-info ("All #chan@foonet output consumed") + (with-current-buffer "#chan@foonet" + (funcall expect 3 "bob") + (funcall expect 3 "was created on") + (funcall expect 3 "prosperous"))) + + (ert-info ("All #chan@barnet output consumed") + (with-current-buffer "#chan@barnet" + (funcall expect 3 "mike") + (funcall expect 3 "was created on") + (funcall expect 3 "ingenuous"))))) + +(ert-deftest erc-scenarios-base-association-multi-net--baseline () + (erc-scenarios-common--base-association-multi-net + (lambda () (with-current-buffer "barnet" (erc-cmd-JOIN "#chan"))))) + +;; The /join command only targets the current buffer's process. This +;; recasts scenario bug#48598 "ambiguous-join" (which was based on +;; bug#47522) to show that issuing superfluous /join commands +;; (apparently fairly common) is benign. + +(ert-deftest erc-scenarios-base-association-multi-net--ambiguous-join () + (erc-scenarios-common--base-association-multi-net + (lambda () + (ert-info ("Nonsensical JOIN attempts silently dropped.") + (with-current-buffer "foonet" (erc-cmd-JOIN "#chan")) + (sit-for 0.1) + (with-current-buffer "#chan" (erc-cmd-JOIN "#chan")) + (sit-for 0.1) + (erc-d-t-wait-for 2 "Buffer #chan endures" (get-buffer "#chan")) + (erc-d-t-wait-for 1 "Only one #chan buffer exists" + (should (equal (erc-scenarios-common-buflist "#chan") + (list (get-buffer "#chan"))))) + (with-current-buffer "*server-barnet*" + (erc-d-t-search-for -0.1 "JOIN")) + (with-current-buffer "barnet" (erc-cmd-JOIN "#chan")))))) + +;; One network, two simultaneous connections, no IDs. +;; Reassociates on reconnect with and without server buffer. + +(defun erc-scenarios-common--base-association-same-network (after) + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/association/same-network") + (dumb-server (erc-d-run "localhost" t 'tester 'chester 'tester-again)) + (port (process-contact dumb-server :service)) + (expect (erc-d-t-make-expecter)) + (erc-server-flood-penalty 0.5) + (erc-server-flood-margin 30)) + + (ert-info ("Connect to foonet with nick tester") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester") + (erc-scenarios-common-assert-initial-buf-name nil port) + (erc-d-t-wait-for 5 "network determined" (eq erc-network 'foonet)))) + + (ert-info ("Connect to foonet with nick chester") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "chester" + :password "changeme" + :full-name "chester") + (erc-scenarios-common-assert-initial-buf-name nil port))) + + (erc-d-t-wait-for 3 "Dialed Buflist is Empty" + (not (erc-scenarios-common-buflist "127.0.0.1"))) + + (with-current-buffer "foonet/tester" + (funcall expect 3 "debug mode") + (erc-cmd-JOIN "#chan")) + + (erc-d-t-wait-for 10 "Channel buffer appears suffixed with tester" + (get-buffer "#chan@foonet/tester")) + + (with-current-buffer "foonet/chester" (funcall expect 3 "debug mode")) + + (erc-d-t-wait-for 10 "Channel buffer appears suffixed with chester" + (get-buffer "#chan@foonet/chester")) + + (ert-info ("Nick tester sees other nick chester in channel") + (with-current-buffer "#chan@foonet/tester" + (funcall expect 5 "chester") + (funcall expect 5 "find the forester") + (erc-cmd-QUIT ""))) + + (ert-info ("Nick chester sees other nick tester in same channel") + (with-current-buffer "#chan@foonet/chester" + (funcall expect 5 "tester") + (funcall expect 5 "find the forester"))) + + (funcall after expect))) + +(ert-deftest erc-scenarios-base-association-same-network--reconnect-one () + (erc-scenarios-common--base-association-same-network + (lambda (expect) + + (ert-info ("Connection tester reconnects") + (with-current-buffer "foonet/tester" + (erc-d-t-wait-for 10 "Foonet connection deceased" + (not (erc-server-process-alive))) + (funcall expect 10 "*** ERC finished") + (erc-cmd-RECONNECT) + (funcall expect 5 "debug mode"))) + + (ert-info ("Reassociated to same channel") + (with-current-buffer "#chan@foonet/tester" + (funcall expect 5 "chester") + (funcall expect 5 "welcome again") + (erc-cmd-QUIT ""))) + + (with-current-buffer "#chan@foonet/chester" + (funcall expect 5 "tester") + (funcall expect 5 "welcome again") + (funcall expect 5 "welcome again") + (erc-cmd-QUIT ""))))) + +(ert-deftest erc-scenarios-base-association-same-network--new-buffer () + (erc-scenarios-common--base-association-same-network + (lambda (expect) + + (ert-info ("Tester kills buffer and connects from scratch") + + (let (port) + (with-current-buffer "foonet/tester" + (erc-d-t-wait-for 10 "Foonet connection deceased" + (not (erc-server-process-alive))) + (funcall expect 10 "*** ERC finished") + (setq port erc-session-port) + (kill-buffer)) + + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester") + + (erc-d-t-wait-for 5 "network determined" + (eq erc-network 'foonet))))) + + (with-current-buffer "foonet/tester" (funcall expect 3 "debug mode")) + + (ert-info ("Reassociated to same channel") + (with-current-buffer "#chan@foonet/tester" + (funcall expect 5 "chester") + (funcall expect 5 "welcome again") + (erc-cmd-QUIT ""))) + + (with-current-buffer "#chan@foonet/chester" + (funcall expect 5 "tester") + (funcall expect 5 "welcome again") + (funcall expect 5 "welcome again") + (erc-cmd-QUIT ""))))) + +;; Playback for same channel on two networks routed correctly. +;; Originally from Bug#48598: 28.0.50; buffer-naming collisions +;; involving bouncers in ERC. + +(ert-deftest erc-scenarios-base-association-bouncer-history () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/association/bouncer-history") + (erc-d-t-cleanup-sleep-secs 1) + (erc-d-linger-secs 1) + (dumb-server (erc-d-run "localhost" t 'foonet 'barnet)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (erc-server-flood-penalty 0.5) + (expect (erc-d-t-make-expecter)) + erc-autojoin-channels-alist + erc-server-buffer-foo erc-server-process-foo + erc-server-buffer-bar erc-server-process-bar) + + (ert-info ("Connect to foonet") + (with-current-buffer + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester")) + (setq erc-server-process-foo erc-server-process) + (should (string= (buffer-name) (format "127.0.0.1:%d" port))) + (funcall expect 5 "foonet"))) + + (erc-d-t-wait-for 5 "Playback JOINs tester to #chan" (get-buffer "#chan")) + + (ert-info ("Connect to barnet") + (with-current-buffer + (setq erc-server-buffer-bar (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "barnet:changeme" + :full-name "tester")) + (setq erc-server-process-bar erc-server-process) + (erc-d-t-wait-for 5 "Temporary name assigned" + (string= (buffer-name) (format "127.0.0.1:%d" port))) + (funcall expect 5 "barnet"))) + + (ert-info ("Server buffers are unique") + (should-not (eq erc-server-buffer-foo erc-server-buffer-bar))) + + (ert-info ("Networks correctly determined and adopted as buffer names") + (with-current-buffer erc-server-buffer-foo + (erc-d-t-wait-for 3 "network name foonet becomes buffer name" + (and (eq (erc-network) 'foonet) (string= (buffer-name) "foonet")))) + (with-current-buffer erc-server-buffer-bar + (erc-d-t-wait-for 3 "network name barnet becomes buffer name" + (and (eq (erc-network) 'barnet) (string= (buffer-name) "barnet"))))) + + (erc-d-t-wait-for 5 "Barnet playback JOINs tester to it's #chan" + (get-buffer "#chan@barnet")) + + (ert-info ("Two channel buffers created, original #chan renamed") + (should (= 4 (length (erc-buffer-list)))) + (should (equal (list (get-buffer "#chan@barnet") + (get-buffer "#chan@foonet")) + (erc-scenarios-common-buflist "#chan")))) + + (ert-info ("#chan@foonet is exclusive, no cross-contamination") + (with-current-buffer "#chan@foonet" + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (should (eq erc-server-process erc-server-process-foo)))) + + (ert-info ("#chan@barnet is exclusive, no cross-contamination") + (with-current-buffer "#chan@barnet" + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (should (eq erc-server-process erc-server-process-bar)))) + + (ert-info ("All output sent") + (with-current-buffer "#chan@foonet" + (while (accept-process-output erc-server-process-foo)) + (erc-d-t-search-for 3 "please your lordship")) + (with-current-buffer "#chan@barnet" + (while (accept-process-output erc-server-process-bar)) + (erc-d-t-search-for 3 "I'll bid adieu"))))) + +(cl-defun erc-scenarios-common--base-session-id-bouncer + ((&key autop foo-id bar-id after + &aux + (foo-id (and foo-id 'oofnet)) + (bar-id (and bar-id 'rabnet)) + (serv-buf-foo (if foo-id "oofnet" "foonet")) + (serv-buf-bar (if bar-id "rabnet" "barnet")) + (chan-buf-foo (if foo-id "#chan@oofnet" "#chan@foonet")) + (chan-buf-bar (if bar-id "#chan@rabnet" "#chan@barnet"))) + &rest dialogs) + "Ensure retired option `erc-rename-buffers' is now the default behavior. +The option `erc-rename-buffers' is now deprecated and on by default, so +this now just asserts baseline behavior. Originally from scenario +clash-of-chans/rename-buffers as explained in Bug#48598: 28.0.50; +buffer-naming collisions involving bouncers in ERC." + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/session-id/bouncer") + (erc-d-t-cleanup-sleep-secs 1) + (erc-server-flood-penalty 0.1) + (dumb-server (apply #'erc-d-run "localhost" t dialogs)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + (erc-server-auto-reconnect autop) + erc-server-buffer-foo erc-server-process-foo + erc-server-buffer-bar erc-server-process-bar) + + (ert-info ("Connect to foonet") + (with-current-buffer + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester" + :id foo-id)) + (setq erc-server-process-foo erc-server-process) + (erc-scenarios-common-assert-initial-buf-name foo-id port) + (erc-d-t-wait-for 3 "Network determined" (eq (erc-network) 'foonet)) + (erc-d-t-wait-for 3 "Final buffer name determined" + (string= (buffer-name) serv-buf-foo)) + (funcall expect 5 "foonet"))) + + (ert-info ("Join #chan@foonet") + (with-current-buffer erc-server-buffer-foo (erc-cmd-JOIN "#chan")) + (erc-d-t-wait-for 5 "Buffer #chan created" (get-buffer "#chan")) + (with-current-buffer "#chan" (funcall expect 5 ""))) + + (ert-info ("Connect to barnet") + (with-current-buffer + (setq erc-server-buffer-bar (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "barnet:changeme" + :full-name "tester" + :id bar-id)) + (setq erc-server-process-bar erc-server-process) + (erc-scenarios-common-assert-initial-buf-name bar-id port) + (erc-d-t-wait-for 3 "Network determined" (eq (erc-network) 'barnet)) + (erc-d-t-wait-for 3 "Final buffer name determined" + (string= (buffer-name) serv-buf-bar)) + (funcall expect 5 "barnet"))) + + (ert-info ("Server buffers are unique, no names based on IPs") + (should-not (eq erc-server-buffer-foo erc-server-buffer-bar)) + (should-not (erc-scenarios-common-buflist "127.0.0.1"))) + + (ert-info ("Join #chan@barnet") + (with-current-buffer erc-server-buffer-bar (erc-cmd-JOIN "#chan"))) + + (erc-d-t-wait-for 5 "Exactly 2 #chan-prefixed buffers exist" + (equal (list (get-buffer chan-buf-bar) + (get-buffer chan-buf-foo)) + (erc-scenarios-common-buflist "#chan"))) + + (ert-info ("#chan@ is exclusive to foonet") + (with-current-buffer chan-buf-foo + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (should (eq erc-server-process erc-server-process-foo)) + (while (accept-process-output erc-server-process-foo)) + (erc-d-t-search-for 1 "ape is dead") + (should-not (erc-server-process-alive)))) + + (ert-info ("#chan@ is exclusive to barnet") + (with-current-buffer chan-buf-bar + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (should (eq erc-server-process erc-server-process-bar)) + (while (accept-process-output erc-server-process-bar)) + (erc-d-t-search-for 1 "keeps you from dishonour") + (should-not (erc-server-process-alive)))) + + (when after (funcall after)))) + +(ert-deftest erc-scenarios-base-session-id-bouncer--base () + (erc-scenarios-common--base-session-id-bouncer () 'foonet 'barnet)) + +(ert-deftest erc-scenarios-base-session-id-bouncer--id-foo () + (erc-scenarios-common--base-session-id-bouncer '(:foo-id t) 'foonet 'barnet)) + +(ert-deftest erc-scenarios-base-session-id-bouncer--id-bar () + (erc-scenarios-common--base-session-id-bouncer '(:bar-id t) 'foonet 'barnet)) + +(ert-deftest erc-scenarios-base-session-id-bouncer--both () + (erc-scenarios-common--base-session-id-bouncer '(:foo-id t :bar-id t) + 'foonet 'barnet)) + +(defun erc-scenarios--clash-rename-pass-handler (dialog exchange) + (when (eq (erc-d-dialog-name dialog) 'stub-again) + (let* ((match (erc-d-exchange-match exchange 1)) + (sym (if (string= match "foonet") 'foonet-again 'barnet-again))) + (should (member match (list "foonet" "barnet"))) + (erc-d-load-replacement-dialog dialog sym 1)))) + +(defun erc-scenarios-common--base-session-id-bouncer--reconnect (foo-id bar-id) + (let ((erc-d-spec-vars '((token . (group (| "barnet" "foonet"))))) + (erc-d-match-handlers + ;; Auto reconnect is nondeterministic, so let computer decide + (list :pass #'erc-scenarios--clash-rename-pass-handler)) + (after + (lambda () + ;; Simulate disconnection and `erc-server-auto-reconnect' + (ert-info ("Reconnect to foonet and barnet back-to-back") + (with-current-buffer (if foo-id "oofnet" "foonet") + (erc-d-t-wait-for 5 "ERC reconnected to foonet" + (erc-server-process-alive))) + (with-current-buffer (if bar-id "rabnet" "barnet") + (erc-d-t-wait-for 5 "ERC reconnected to barnet" + (erc-server-process-alive)))) + + (ert-info ("#chan@foonet is exclusive to foonet") + (with-current-buffer (if foo-id "#chan@oofnet" "#chan@foonet") + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (while (accept-process-output erc-server-process)) + (erc-d-t-search-for 3 "please your lordship"))) + + (ert-info ("#chan@barnet is exclusive to barnet") + (with-current-buffer (if bar-id "#chan@rabnet" "#chan@barnet") + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (while (accept-process-output erc-server-process)) + (erc-d-t-search-for 1 "much in private"))) + + ;; XXX this is important (reconnects overlapped, so we'd get + ;; chan@127.0.0.1:6667) + (should-not (erc-scenarios-common-buflist "127.0.0.1")) + ;; Reconnection order doesn't matter here because session objects + ;; are persisted, meaning original timestamps preserved. + (should (equal (list (get-buffer (if bar-id "#chan@rabnet" + "#chan@barnet")) + (get-buffer (if foo-id "#chan@oofnet" + "#chan@foonet"))) + (erc-scenarios-common-buflist "#chan")))))) + (erc-scenarios-common--base-session-id-bouncer + (list :autop t :foo-id foo-id :bar-id bar-id :after after) + 'foonet-drop 'barnet-drop + 'stub-again 'stub-again + 'foonet-again 'barnet-again))) + +(ert-deftest erc-scenarios-base-session-id-bouncer--reconnect-base () + (erc-scenarios-common--base-session-id-bouncer--reconnect nil nil)) + +(ert-deftest erc-scenarios-base-session-id-bouncer--reconnect-id-foo () + (erc-scenarios-common--base-session-id-bouncer--reconnect 'foo-id nil)) + +(ert-deftest erc-scenarios-base-session-id-bouncer--reconnect-id-bar () + (erc-scenarios-common--base-session-id-bouncer--reconnect nil 'bar-id)) + +(ert-deftest erc-scenarios-base-session-id-bouncer--reconnect-both () + (erc-scenarios-common--base-session-id-bouncer--reconnect 'foo-id 'bar-id)) + +;; Ensure deprecated option still respected when old default value +;; explicitly set ("respected" in the sense of having names reflect +;; dialed TCP endpoints with possible uniquifiers but without any of +;; the old issues, pre-bug#48598). + +(defun erc-scenarios-common--base-compat-no-rename-bouncer (dialogs auto more) + (erc-scenarios-common-with-cleanup + ;; These actually *are* (assigned-)session-id related because + ;; our kludge assigns one after the fact. + ((erc-scenarios-common-dialog "base/session-id/bouncer") + (erc-d-t-cleanup-sleep-secs 1) + (erc-server-flood-penalty 0.1) + (dumb-server (apply #'erc-d-run "localhost" t dialogs)) + (port (process-contact dumb-server :service)) + (chan-buf-foo (format "#chan@127.0.0.1:%d" port)) + (chan-buf-bar (format "#chan@127.0.0.1:%d<2>" port)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + (erc-server-auto-reconnect auto) + erc-server-buffer-foo erc-server-process-foo + erc-server-buffer-bar erc-server-process-bar) + + (ert-info ("Connect to foonet") + (with-current-buffer + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester" + :id nil)) + (setq erc-server-process-foo erc-server-process) + (erc-d-t-wait-for 3 "Network determined" (eq (erc-network) 'foonet)) + (erc-d-t-wait-for 3 "Final buffer name determined" + (string= (buffer-name) (format "127.0.0.1:%d" port))) + (funcall expect 5 "foonet"))) + + (ert-info ("Join #chan@foonet") + (with-current-buffer erc-server-buffer-foo (erc-cmd-JOIN "#chan")) + (erc-d-t-wait-for 5 "Buffer #chan created" (get-buffer "#chan")) + (with-current-buffer "#chan" (funcall expect 5 ""))) + + (ert-info ("Connect to barnet") + (with-current-buffer + (setq erc-server-buffer-bar (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "barnet:changeme" + :full-name "tester" + :id nil)) + (setq erc-server-process-bar erc-server-process) + (erc-d-t-wait-for 3 "Network determined" (eq (erc-network) 'barnet)) + (erc-d-t-wait-for 3 "Final buffer name determined" + (string= (buffer-name) (format "127.0.0.1:%d<2>" port))) + (funcall expect 5 "barnet"))) + + (ert-info ("Server buffers are unique, no names based on IPs") + (should-not (eq erc-server-buffer-foo erc-server-buffer-bar)) + (should (equal (erc-scenarios-common-buflist "127.0.0.1") + (list (get-buffer (format "127.0.0.1:%d<2>" port)) + (get-buffer (format "127.0.0.1:%d" port)))))) + + (ert-info ("Join #chan@barnet") + (with-current-buffer erc-server-buffer-bar (erc-cmd-JOIN "#chan"))) + + (erc-d-t-wait-for 5 "Exactly 2 #chan-prefixed buffers exist" + (equal (list (get-buffer chan-buf-bar) + (get-buffer chan-buf-foo)) + (erc-scenarios-common-buflist "#chan"))) + + (ert-info ("#chan@127.0.0.1:$port is exclusive to foonet") + (with-current-buffer chan-buf-foo + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (should (eq erc-server-process erc-server-process-foo)) + (while (accept-process-output erc-server-process-foo)) + (erc-d-t-search-for 1 "ape is dead") + (should-not (erc-server-process-alive)))) + + (ert-info ("#chan@127.0.0.1:$port<2> is exclusive to barnet") + (with-current-buffer chan-buf-bar + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (should (eq erc-server-process erc-server-process-bar)) + (while (accept-process-output erc-server-process-bar)) + (erc-d-t-search-for 1 "keeps you from dishonour") + (should-not (erc-server-process-alive)))) + + (when more (funcall more)))) + +(ert-deftest erc-scenarios-base-compat-no-rename-bouncer--basic () + (with-suppressed-warnings ((obsolete erc-rename-buffers)) + (let (erc-rename-buffers) + (erc-scenarios-common--base-compat-no-rename-bouncer + '(foonet barnet) nil nil)))) + +(ert-deftest erc-scenarios-base-compat-no-rename-bouncer--reconnect () + (let ((erc-d-spec-vars '((token . (group (| "barnet" "foonet"))))) + (erc-d-match-handlers + (list :pass #'erc-scenarios--clash-rename-pass-handler)) + (dialogs '(foonet-drop barnet-drop stub-again stub-again + foonet-again barnet-again)) + (after + (lambda () + (pcase-let* ((`(,barnet ,foonet) + (erc-scenarios-common-buflist "127.0.0.1")) + (port (process-contact (with-current-buffer foonet + erc-server-process) + :service))) + + (ert-info ("Sanity check: barnet retains uniquifying suffix") + (should (string-suffix-p "<2>" (buffer-name barnet)))) + + ;; Simulate disconnection and `erc-server-auto-reconnect' + (ert-info ("Reconnect to foonet and barnet back-to-back") + (with-current-buffer foonet + (erc-d-t-wait-for 5 "ERC reconnected to foonet" + (erc-server-process-alive))) + (with-current-buffer barnet + (erc-d-t-wait-for 5 "ERC reconnected to barnet" + (erc-server-process-alive)))) + + (ert-info ("#chan@127.0.0.1: is exclusive to foonet") + (with-current-buffer (format "#chan@127.0.0.1:%d" port) + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (while (accept-process-output erc-server-process)) + (erc-d-t-search-for 3 "please your lordship"))) + + (ert-info ("#chan@barnet is exclusive to barnet") + (with-current-buffer (format "#chan@127.0.0.1:%d<2>" port) + (erc-d-t-search-for 1 "") + (erc-d-t-search-for -0.1 "") + (while (accept-process-output erc-server-process)) + (erc-d-t-search-for 1 "much in private"))) + + ;; Ordering deterministic here even though not so for reconnect + (should (equal (list barnet foonet) + (erc-scenarios-common-buflist "127.0.0.1"))) + (should (equal (list + (get-buffer (format "#chan@127.0.0.1:%d<2>" port)) + (get-buffer (format "#chan@127.0.0.1:%d" port))) + (erc-scenarios-common-buflist "#chan"))))))) + + (with-suppressed-warnings ((obsolete erc-rename-buffers)) + (let (erc-rename-buffers) + (erc-scenarios-common--base-compat-no-rename-bouncer dialogs + 'auto after))))) + +;; The added complexity of a request handler definitely stinks. But on +;; some machines, the ordering from the selector is nondeterministic, +;; whereas normally, the filter for the last process created (in the +;; code) gets all the initial attention. FIXME delete obsolete comment + +(defun erc-scenarios--rebuffed-gapless-pass-handler (dialog exchange) + (when (eq (erc-d-dialog-name dialog) 'pass-stub) + (let* ((match (erc-d-exchange-match exchange 1)) + (sym (if (string= match "foonet") 'foonet 'barnet))) + (should (member match (list "foonet" "barnet"))) + (erc-d-load-replacement-dialog dialog sym 1)))) + +(ert-deftest erc-scenarios-base-gapless-connect () + "Back-to-back entry-point invocations happen successfully. +Originally from scenario rebuffed/gapless as explained in Bug#48598: +28.0.50; buffer-naming collisions involving bouncers in ERC." + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/gapless-connect") + (erc-server-flood-penalty 0.1) + (erc-d-linger-secs 4) + (erc-server-flood-penalty erc-server-flood-penalty) + (erc-d-spec-vars '((token . (group (| "barnet" "foonet"))))) + (erc-d-match-handlers + (list :pass #'erc-scenarios--rebuffed-gapless-pass-handler)) + (dumb-server (erc-d-run "localhost" t + 'pass-stub 'pass-stub 'barnet 'foonet)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + erc-autojoin-channels-alist + erc-server-buffer-foo + erc-server-buffer-bar) + + (ert-info ("Connect twice to same endpoint without pausing") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester") + erc-server-buffer-bar (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "barnet:changeme" + :full-name "tester"))) + + (ert-info ("Returned server buffers are unique") + (should-not (eq erc-server-buffer-foo erc-server-buffer-bar))) + + (ert-info ("Both connections still alive") + (should (get-process (format "erc-127.0.0.1-%d" port))) + (should (get-process (format "erc-127.0.0.1-%d<1>" port)))) + + (with-current-buffer erc-server-buffer-bar + (funcall expect 1 "marked as being away")) + + (with-current-buffer + (erc-d-t-wait-for 20 "Buffer #bar exists" (get-buffer "#bar")) + (while (accept-process-output erc-server-process)) + (funcall expect 2 "was created on") + (funcall expect 2 "his second fit")) + + (with-current-buffer + (erc-d-t-wait-for 20 "Buffer #foo exists" (get-buffer "#foo")) + (while (accept-process-output erc-server-process)) + (funcall expect 2 "was created on") + (funcall expect 2 "no use of him")))) + +(defun erc-scenarios-common--base-reuse-buffers-server-buffers (&optional more) + "Show that `erc-reuse-buffers' doesn't affect server buffers. +Overlaps some with `clash-of-chans/uniquify'. Adapted from +rebuffed/reuseless, described in Bug#48598: 28.0.50; buffer-naming +collisions involving bouncers in ERC. Run EXTRA." + (erc-scenarios-common-with-cleanup + ((erc-d-linger-secs 1) + (dumb-server (erc-d-run "localhost" t 'foonet 'barnet)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + erc-autojoin-channels-alist) + + (ert-info ("Connect to foonet") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester") + (should (string= (buffer-name) (format "127.0.0.1:%d" port))) + (erc-d-t-search-for 2 "marked as being away"))) + + (ert-info ("Connect to barnet") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "barnet:changeme" + :full-name "tester") + (should (string= (buffer-name) (format "127.0.0.1:%d" port))) + (erc-d-t-search-for 2 "marked as being away"))) + + (erc-d-t-wait-for 2 "Buffer named foonet exists" (get-buffer "foonet")) + (erc-d-t-wait-for 2 "Buffer named barnet exists" (get-buffer "barnet")) + + (ert-info ("Server buffers are unique, no IP-based names") + (should-not (eq (get-buffer "foonet") (get-buffer "barnet"))) + (should-not (erc-scenarios-common-buflist "127.0.0.1"))) + + (when more (funcall more)))) + +(ert-deftest erc-scenarios-base-reuse-buffers-server-buffers--enabled () + (should erc-reuse-buffers) + (let ((erc-scenarios-common-dialog "base/reuse-buffers/server-buffers")) + (erc-scenarios-common--base-reuse-buffers-server-buffers))) + +(ert-deftest erc-scenarios-base-reuse-buffers-server-buffers--disabled () + (should erc-reuse-buffers) + (let ((erc-scenarios-common-dialog "base/reuse-buffers/server-buffers") + erc-reuse-buffers) + (erc-scenarios-common--base-reuse-buffers-server-buffers))) + +;; The server changes your nick just after registration. + +(ert-deftest erc-scenarios-base-renick-self-auto () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/renick/self") + (erc-d-linger-secs 0.1) + (erc-server-flood-penalty 0.1) + (dumb-server (erc-d-run "localhost" t 'auto)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + erc-autojoin-channels-alist + erc-server-buffer-foo) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (erc-d-t-wait-for 3 "server for foonet renamed" (get-buffer "foonet")) + + (with-current-buffer "foonet" + (erc-d-t-search-for 10 "Your new nickname is dummy")) + + (ert-info ("Joined by bouncer to #foo, own nick present") + (erc-d-t-wait-for 1 "#foo created" (get-buffer "#foo")) + (with-current-buffer "#foo" + (erc-d-t-search-for 10 "dummy") + (erc-d-t-search-for 10 "On Thursday"))))) + +;; You change your nickname manually in a server buffer; a message is +;; printed in channel buffers. + +(ert-deftest erc-scenarios-base-renick-self-manual () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/renick/self") + (erc-d-linger-secs 0.1) + (erc-server-flood-penalty 0.1) + (dumb-server (erc-d-run "localhost" t 'manual)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + erc-autojoin-channels-alist + erc-server-buffer-foo) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (erc-d-t-wait-for 3 "server for foonet renamed" (get-buffer "foonet")) + + (ert-info ("Joined by bouncer to #foo, own nick present") + (erc-d-t-wait-for 1 "#foo created" (get-buffer "#foo")) + (with-current-buffer "#foo" + (funcall expect 5 "tester") + (funcall expect 5 "On Thursday") + (erc-with-server-buffer (erc-cmd-NICK "dummy")) + (funcall expect 5 "Your new nickname is dummy") + (funcall expect 5 " dummy: Hi"))))) + +;; You connect to the same network with two different nicks. You +;; manually change the first nick at some point, and buffer names are +;; updated correctly. + +(ert-deftest erc-scenarios-base-renick-self-qualified () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/renick/self") + (dumb-server (erc-d-run "localhost" t 'qual-tester 'qual-chester)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + (erc-server-flood-penalty 0.1) + (erc-server-flood-margin 30) + erc-serv-buf-a erc-serv-buf-b) + + (ert-info ("Connect to foonet with nick tester") + (with-current-buffer + (setq erc-serv-buf-a (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester")) + (erc-d-t-wait-for 5 "network determined" (eq erc-network 'foonet)))) + + (ert-info ("Connect to foonet with nick chester") + (with-current-buffer + (setq erc-serv-buf-b (erc :server "127.0.0.1" + :port port + :nick "chester" + :password "changeme" + :full-name "chester")))) + + (erc-d-t-wait-for 3 "Dialed Buflist is Empty" + (not (erc-scenarios-common-buflist "127.0.0.1"))) + + (with-current-buffer "foonet/tester" + (funcall expect 3 "debug mode") + (erc-cmd-JOIN "#chan")) + + (with-current-buffer "foonet/chester" + (funcall expect 3 "debug mode") + (erc-cmd-JOIN "#chan")) + + (erc-d-t-wait-for 10 "Channel buffer appears suffixed with tester" + (get-buffer "#chan@foonet/tester")) + + (erc-d-t-wait-for 10 "Channel buffer appears suffixed with chester" + (get-buffer "#chan@foonet/chester")) + + (ert-info ("Greets other nick in same channel") + (with-current-buffer "#chan@foonet/tester" + (funcall expect 5 " chester, welcome!") + (erc-cmd-NICK "dummy") + (funcall expect 5 "Your new nickname is dummy") + (funcall expect 5 "find the forester") + (should (string= (buffer-name) "#chan@foonet/dummy")))) + + (ert-info ("Renick propagated throughout all buffers of process") + (should-not (get-buffer "#chan@foonet/tester")) + (should-not (get-buffer "foonet/tester")) + (should (get-buffer "foonet/dummy"))))) + +;; When a channel user changes their nick, any query buffers for them +;; are updated. + +(ert-deftest erc-scenarios-base-renick-queries-solo () + + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/renick/queries") + (erc-d-linger-secs 0.1) + (erc-server-flood-penalty 0.1) + (erc-server-flood-margin 20) + (dumb-server (erc-d-run "localhost" t 'solo)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + erc-autojoin-channels-alist + erc-server-buffer-foo) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (erc-d-t-wait-for 1 "server for foonet renamed" (get-buffer "foonet")) + + (ert-info ("Joined by bouncer to #foo, pal persent") + (with-current-buffer + (erc-d-t-wait-for 1 "chan #foo exists" (get-buffer "#foo")) + (erc-d-t-search-for 1 "On Thursday") + (goto-char erc-input-marker) + (insert "hi") + (erc-send-current-line))) + + (erc-d-t-wait-for 10 "Query buffer appears with message from pal" + (get-buffer "Lal")) + + (ert-info ("Chat with pal, who changes name") + (with-current-buffer "Lal" + (erc-d-t-search-for 3 "hello") + (goto-char erc-input-marker) + (insert "hi") + (erc-send-current-line) + (erc-d-t-search-for 10 "is now known as Linguo") + (should-not (search-forward "is now known as Linguo" nil t)))) + + (erc-d-t-wait-for 1 "Query buffer's name changes" + (get-buffer "Linguo")) + (should-not (get-buffer "Lal")) + + (with-current-buffer "Linguo" + (goto-char erc-input-marker) + (insert "howdy Linguo") + (erc-send-current-line)) + + (with-current-buffer "#foo" + (erc-d-t-search-for 10 "is now known as Linguo") + (should-not (search-forward "is now known as Linguo" nil t)) + (erc-cmd-PART "")) + + (with-current-buffer "Linguo" + (erc-d-t-search-for 10 "get along")))) + +;; You share a channel and a query buffer with a user on two different +;; networks (through a proxy). The user changes their nick on both +;; networks at the same time. Query buffers are updated accordingly. + +(ert-deftest erc-scenarios-base-renick-queries-bouncer () + + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/renick/queries") + (erc-d-linger-secs 0.5) + (erc-server-flood-penalty 0.1) + (erc-server-flood-margin 30) + (dumb-server (erc-d-run "localhost" t 'bouncer-foonet 'bouncer-barnet)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + erc-accidental-paste-threshold-seconds + erc-autojoin-channels-alist + erc-server-buffer-foo + erc-server-buffer-bar) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "foonet:changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (erc-d-t-wait-for 1 "server for foonet renamed" (get-buffer "foonet")) + + (ert-info ("Connect to barnet") + (setq erc-server-buffer-bar (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "barnet:changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-bar + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (erc-d-t-wait-for 1 "server for barnet renamed" (get-buffer "barnet")) + (should-not (erc-scenarios-common-buflist "127.0.0.1")) + + (ert-info ("Joined by bouncer to #chan@foonet, pal persent") + (erc-d-t-wait-for 10 "#chan@foonet exists" (get-buffer "#chan@foonet")) + (with-current-buffer "#chan@foonet" + (funcall expect 1 "rando") + (funcall expect 1 "simply misused"))) + + (ert-info ("Joined by bouncer to #chan@barnet, pal persent") + (erc-d-t-wait-for 10 "#chan@barnet exists" (get-buffer "#chan@barnet")) + (with-current-buffer "#chan@barnet" + (funcall expect 1 "rando") + (funcall expect 1 "come, sir, I am"))) + + (ert-info ("Query buffer exists for rando@foonet") + (erc-d-t-wait-for 10 "rando@foonet exists" (get-buffer "rando@foonet")) + (with-current-buffer "rando@foonet" + (funcall expect 1 "guess not") + (goto-char erc-input-marker) + (insert "I here") + (erc-send-current-line))) + + (ert-info ("Query buffer exists for rando@barnet") + (erc-d-t-wait-for 10 "rando@barnet exists" (get-buffer "rando@barnet")) + (with-current-buffer "rando@barnet" + (funcall expect 2 "rentacop") + (goto-char erc-input-marker) + (insert "Linda said you were gonna kill me.") + (erc-send-current-line))) + + (ert-info ("Sync convo for rando@foonet") + (with-current-buffer "rando@foonet" + (funcall expect 1 "u are dumb") + (goto-char erc-input-marker) + (insert "not so") + (erc-send-current-line))) + + (ert-info ("Sync convo for rando@barnet") + (with-current-buffer "rando@barnet" + (funcall expect 3 "I never saw her before") + (goto-char erc-input-marker) + (insert "You aren't with Wage?") + (erc-send-current-line))) + + (erc-d-t-wait-for 1 "buffer name change for rando@foonet" + (get-buffer "frenemy@foonet")) + (erc-d-t-wait-for 1 "buffer name change for rando@barnet" + (get-buffer "frenemy@barnet")) + + (should-not (get-buffer "rando@foonet")) + (should-not (get-buffer "rando@barnet")) + + (with-current-buffer "frenemy@foonet" + (funcall expect 1 "now known as") + (funcall expect 1 "doubly so")) + + (with-current-buffer "frenemy@barnet" + (funcall expect 1 "now known as") + (funcall expect 1 "reality picture")) + + (when noninteractive + (with-current-buffer "frenemy@barnet" (kill-buffer)) + (erc-d-t-wait-for 2 "frenemy@foonet changed back to frenemy" + (get-buffer "frenemy")) + (should-not (get-buffer "frenemy@foonet"))) + + (with-current-buffer "#chan@foonet" + (funcall expect 10 "is now known as frenemy") + (should-not (search-forward "now known as frenemy" nil t)) ; regression + (funcall expect 10 "words are razors")) + + (with-current-buffer "#chan@barnet" + (funcall expect 10 "is now known as frenemy") + (should-not (search-forward "now known as frenemy" nil t)) + (while (accept-process-output erc-server-process)) + (funcall expect 10 "I have lost")))) + +(ert-deftest erc-scenarios-aux-unix-socket () + (skip-unless (featurep 'make-network-process '(:family local))) + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/renick/self") + (erc-d-linger-secs 0.1) + (erc-server-flood-penalty 0.1) + (sock (expand-file-name "erc-d.sock" temporary-file-directory)) + (erc-scenarios-common-extra-teardown (lambda () + (delete-file sock))) + (erc-server-connect-function + (lambda (n b _ p &rest r) + (apply #'make-network-process + `(:name ,n :buffer ,b :service ,p :family local ,@r)))) + (dumb-server (erc-d-run nil sock 'auto)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + erc-autojoin-channels-alist + erc-server-buffer-foo) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer-foo (erc :server "fake" + :port sock + :nick "tester" + :password "foonet:changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "fake:%s" sock))))) + + (erc-d-t-wait-for 3 "server for foonet renamed" (get-buffer "foonet")) + + (with-current-buffer "foonet" + (erc-d-t-search-for 10 "Your new nickname is dummy")) + + (ert-info ("Joined by bouncer to #foo, own nick present") + (erc-d-t-wait-for 1 "#foo created" (get-buffer "#foo")) + (with-current-buffer "#foo" + (erc-d-t-search-for 10 "dummy") + (erc-d-t-search-for 10 "On Thursday"))))) + +;; See `erc-update-server-buffer-name'. A perceived loss in +;; network connectivity turns out to be a false alarm, but the +;; bouncer has already accepted the second connection + +(defun erc-scenarios--base-aborted-reconnect () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/aborted-reconnect") + (erc-d-t-cleanup-sleep-secs 1) + (erc-d-linger-secs 0.5) + (dumb-server (erc-d-run "localhost" t 'foonet 'foonet-dupe)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + erc-autojoin-channels-alist + erc-server-buffer-foo) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (ert-info ("Server buffer is unique and temp name is absent") + (erc-d-t-wait-for 1 "server for foonet renamed" (get-buffer "FooNet")) + (should-not (erc-scenarios-common-buflist "127.0.0.1")) + (with-current-buffer erc-server-buffer-foo + (erc-cmd-JOIN "#chan"))) + + (ert-info ("Channel buffer #chan alive and well") + (with-current-buffer + (erc-d-t-wait-for 4 "#chan created" (get-buffer "#chan")) + (erc-d-t-search-for 10 "welcome"))) + + (ert-info ("Connect to foonet again") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester")) + (let ((inhibit-message noninteractive)) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "127.0.0.1:%d" port))) + (erc-d-t-wait-for 5 "Second process killed" + (not (erc-server-process-alive))) + (erc-d-t-search-for 10 "FooNet still connected")))) + + (ert-info ("Server buffer is unique and temp name is absent") + (should (equal (list (get-buffer "FooNet")) + (erc-scenarios-common-buflist "FooNet"))) + (should (equal (list (get-buffer (format "127.0.0.1:%d" port))) + (erc-scenarios-common-buflist "127.0.0.1")))) + + (ert-info ("Channel buffer #chan still going") + (with-current-buffer "#chan" + (erc-d-t-search-for 10 "and be prosperous"))))) + +(ert-deftest erc-scenarios-base-aborted-reconnect () + :tags '(:unstable) + (let ((tries 3) + (timeout 1) + failed) + (while (condition-case _err + (progn + (erc-scenarios--base-aborted-reconnect) + nil) + (ert-test-failed + (message "Test %S failed; %s attempt(s) remaining." + (ert-test-name (ert-running-test)) + tries) + (sleep-for (cl-incf timeout)) + (not (setq failed (zerop (cl-decf tries))))))) + (should-not failed))) + +;; This defends against a regression in `erc-server-PRIVMSG' caused by +;; the removal of `erc-auto-query'. When an active channel buffer is +;; killed off and PRIVMSGs arrive targeting it, the buffer should be +;; recreated. See elsewhere for NOTICE logic, which is more complex. + +(ert-deftest erc-scenarios-base-channel-buffer-revival () + + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/channel-buffer-revival") + (erc-d-linger-secs 0.5) + (dumb-server (erc-d-run "localhost" t 'foonet)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + erc-autojoin-channels-alist + erc-server-buffer-foo) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (ert-info ("Server buffer is unique and temp name is absent") + (erc-d-t-wait-for 1 "server for foonet renamed" (get-buffer "FooNet")) + (should-not (erc-scenarios-common-buflist "127.0.0.1")) + (with-current-buffer erc-server-buffer-foo + (erc-cmd-JOIN "#chan"))) + + (ert-info ("Channel buffer #chan alive and well") + (with-current-buffer + (erc-d-t-wait-for 8 "#chan exists" (get-buffer "#chan")) + (erc-d-t-search-for 10 "Our queen and all her elves") + (kill-buffer))) + + (should-not (get-buffer "#chan")) + + (ert-info ("Channel buffer #chan revived") + (erc-d-t-wait-for 5 "#chan exists again" (get-buffer "#chan")) + (with-current-buffer "#chan" + (erc-d-t-search-for 10 "and be prosperous"))))) + +;; This ensures we only reconnect `erc-server-reconnect-attempts' +;; (rather than infinitely many) times, which can easily happen when +;; tweaking code related to process sentinels in erc-backend.el. + +(ert-deftest erc-scenarios-base-reconnect-timer () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/reconnect-timer") + (dumb-server (erc-d-run "localhost" t 'foonet 'foonet 'foonet-last)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + (erc-server-auto-reconnect t) + erc-autojoin-channels-alist + erc-server-buffer) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (ert-info ("Server tries to connect thrice (including initial attempt)") + (with-current-buffer erc-server-buffer + (dotimes (n 3) + (ert-info ((format "Attempt %d" n)) + (funcall expect 3 "Opening connection") + (funcall expect 2 "Password incorrect") + (funcall expect 2 "Connection failed!") + (funcall expect 2 "Re-establishing connection"))) + (ert-info ("Prev attempt was final") + (erc-d-t-search-for -1 "Opening connection" (point))))) + + (ert-info ("Server buffer is unique and temp name is absent") + (should (equal (list (get-buffer (format "127.0.0.1:%d" port))) + (erc-scenarios-common-buflist "127.0.0.1")))))) + +(cl-defun erc-scenarios-common--base-session-id-same-network + ((&key nick id server chan + &aux (nick-a nick) (id-a id) (serv-buf-a server) (chan-buf-a chan)) + (&key nick id server chan + &aux (nick-b nick) (id-b id) (serv-buf-b server) (chan-buf-b chan))) + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/session-id/same-network") + (dumb-server (erc-d-run "localhost" t 'tester 'chester)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + (erc-server-flood-penalty 0.1) + (erc-server-flood-margin 30) + erc-serv-buf-a erc-serv-buf-b) + + (ert-info ("Connect to foonet with nick tester") + (with-current-buffer + (setq erc-serv-buf-a (erc :server "127.0.0.1" + :port port + :nick nick-a + :password "changeme" + :full-name nick-a + :id id-a)) + (erc-scenarios-common-assert-initial-buf-name id-a port) + (erc-d-t-wait-for 5 "network determined" (eq erc-network 'foonet)))) + + (ert-info ("Connect to foonet with nick chester") + (with-current-buffer + (setq erc-serv-buf-b (erc :server "127.0.0.1" + :port port + :nick nick-b + :password "changeme" + :full-name nick-b + :id id-b)) + (erc-scenarios-common-assert-initial-buf-name id-b port))) + + (erc-d-t-wait-for 3 "Dialed Buflist is Empty" + (not (erc-scenarios-common-buflist "127.0.0.1"))) + + (with-current-buffer erc-serv-buf-a + (should (string= (buffer-name) serv-buf-a)) + (funcall expect 3 "debug mode") + (erc-cmd-JOIN "#chan")) + + (with-current-buffer erc-serv-buf-b + (should (string= (buffer-name) serv-buf-b)) + (funcall expect 3 "debug mode") + (erc-cmd-JOIN "#chan")) + + (erc-d-t-wait-for 10 "Channel buffer appears suffixed with tester" + (get-buffer chan-buf-a)) + + (erc-d-t-wait-for 10 "Channel buffer appears suffixed with chester" + (get-buffer chan-buf-b)) + + (ert-info ("Greets other nick in same channel") + (with-current-buffer chan-buf-a + (funcall expect 5 "chester") + (funcall expect 5 "find the forester") + (erc-cmd-MSG "#chan chester: hi"))) + + (ert-info ("Sees other nick in same channel") + (with-current-buffer chan-buf-b + (funcall expect 5 "tester") + (funcall expect 10 " chester: hi") + (funcall expect 5 "This was lofty") + (erc-cmd-MSG "#chan hi tester"))) + + (with-current-buffer chan-buf-a + (funcall expect 5 "To employ you towards") + (erc-cmd-QUIT "")) + + (with-current-buffer chan-buf-b + (funcall expect 5 "To employ you towards") + (erc-cmd-QUIT "")))) + +(ert-deftest erc-scenarios-base-session-id-same-network--two-ids () + (erc-scenarios-common--base-session-id-same-network + (list :nick "tester" + :id 'tester/foonet + :server "tester/foonet" + :chan "#chan@tester/foonet") + (list :nick "chester" + :id 'chester/foonet + :server "chester/foonet" + :chan "#chan@chester/foonet"))) + +(ert-deftest erc-scenarios-base-session-id-same-network--one-id-tester () + (erc-scenarios-common--base-session-id-same-network + (list :nick "tester" + :id 'tester/foonet + :server "tester/foonet" + :chan "#chan@tester/foonet") + (list :nick "chester" + :id nil + :server "foonet" + :chan "#chan@foonet"))) + +(ert-deftest erc-scenarios-base-session-id-same-network--one-id-chester () + (erc-scenarios-common--base-session-id-same-network + (list :nick "tester" + :id nil + :server "foonet" + :chan "#chan@foonet") + (list :nick "chester" + :id 'chester/foonet + :server "chester/foonet" + :chan "#chan@chester/foonet"))) + +(ert-deftest erc-scenarios-base-session-id-same-network--no-ids () + (erc-scenarios-common--base-session-id-same-network + (list :nick "tester" + :id nil + :server "foonet/tester" + :chan "#chan@foonet/tester") ; <- note net before nick + (list :nick "chester" + :id nil + :server "foonet/chester" + :chan "#chan@foonet/chester"))) + +;; Upon reconnecting, playback for channel and target buffers is +;; routed correctly. + +(ert-deftest erc-scenarios-base-association-reconnect-playback () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/association/reconnect-playback") + (erc-d-linger-secs 0.5) + (erc-server-flood-penalty 0.1) + (erc-server-flood-margin 30) + (dumb-server (erc-d-run "localhost" t 'foonet 'foonet-again)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (expect (erc-d-t-make-expecter)) + erc-autojoin-channels-alist + erc-server-buffer-foo) + + (ert-info ("Connect to foonet") + (setq erc-server-buffer-foo (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester")) + (with-current-buffer erc-server-buffer-foo + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (ert-info ("Setup") + + (ert-info ("Server buffer is unique and temp name is absent") + (erc-d-t-wait-for 1 "server for foonet renamed" (get-buffer "foonet")) + (should-not (erc-scenarios-common-buflist "127.0.0.1"))) + + (ert-info ("Channel buffer #chan playback received") + (erc-d-t-wait-for 3 "#chan exists" (get-buffer "#chan")) + (with-current-buffer "#chan" + (funcall expect 10 "But purgatory"))) + + (ert-info ("Ask for help from services or bouncer bot") + (with-current-buffer erc-server-buffer-foo + (erc-cmd-MSG "*status help"))) + + (ert-info ("Help received") + (erc-d-t-wait-for 5 "*status buffer exists" (get-buffer "*status")) + (with-current-buffer "*status" + (funcall expect 10 "Rehash"))) + + (ert-info ("#chan convo done") + (with-current-buffer "#chan" + (funcall expect 10 "most egregious indignity")))) + + (with-current-buffer erc-server-buffer-foo + (erc-cmd-QUIT "") + (erc-d-t-wait-for 4 "proc dies" (not (erc-server-process-alive))) + (erc-cmd-RECONNECT)) + + (ert-info ("Channel buffer found and associated") + (with-current-buffer "#chan" + (funcall expect 10 "Wilt thou rest damned"))) + + (ert-info ("Help buffer found and associated") + (with-current-buffer "*status" + (goto-char erc-input-marker) + (insert "help") + (erc-send-current-line) + (funcall expect 10 "Restart ZNC"))) + + (ert-info ("#chan convo done") + (with-current-buffer "#chan" + (funcall expect 10 "here comes the lady"))))) + +;; You register a new nick, disconnect, and log back in, but your nick +;; is not granted, so ERC obtains a backtick'd version. You open a +;; query buffer for NickServ, and ERC names it using the session ID +;; (which includes the backtick'd nick) as a suffix. The original +;; (disconnected) NickServ buffer gets renamed with *its* session ID +;; as well. You then identify to NickServ, and the dead session is no +;; longer considered distinct. + +(ert-deftest erc-scenarios-base-association-nick-bumped () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/association/nick-bump") + (dumb-server (erc-d-run "localhost" t 'renicked 'renicked-again)) + (port (process-contact dumb-server :service)) + (expect (erc-d-t-make-expecter)) + (erc-server-flood-penalty 0.5) + (erc-server-flood-margin 30)) + + (ert-info ("Connect to foonet with nick tester") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :full-name "tester") + (erc-scenarios-common-assert-initial-buf-name nil port) + (erc-d-t-wait-for 5 "network determined" (eq erc-network 'foonet)))) + + (ert-info ("Create an account for tester and quit") + (with-current-buffer "foonet" + (funcall expect 3 "debug mode") + + (erc-cmd-QUERY "NickServ") + (with-current-buffer "NickServ" + (erc-send-input-line "NickServ" "REGISTER changeme") + (funcall expect 5 "Account created") + (funcall expect 1 "You're now logged in as tester")) + + (with-current-buffer "foonet" + (erc-cmd-QUIT "") + (erc-d-t-wait-for 4 "proc dies" (not (erc-server-process-alive))) + (funcall expect 5 "ERC finished")))) + + (with-current-buffer "foonet" + (erc-cmd-RECONNECT)) + + (erc-d-t-wait-for 10 "Nick request rejection prevents reassociation (good)" + (get-buffer "foonet/tester`")) + + (ert-info ("Ask NickServ to change nick") + (with-current-buffer "foonet/tester`" + (funcall expect 3 "already in use") + (funcall expect 3 "debug mode") + (erc-cmd-QUERY "NickServ")) + + (erc-d-t-wait-for 1 "Dead NickServ query buffer renamed now qualified" + (get-buffer "NickServ@foonet/tester")) + + (with-current-buffer "NickServ@foonet/tester`" ; new one + (erc-send-input-line "NickServ" "IDENTIFY tester changeme") + (funcall expect 5 "You're now logged in as tester") + (should (equal (buffer-name) "NickServ@foonet/tester")))) + + (ert-info ("Ours is the only NickServ buffer that remains") + (should-not (cdr (erc-scenarios-common-buflist "NickServ")))) + + (should (not (get-buffer "foonet/tester`"))))) + +;; Ensure the old way of specifying a partial domain name still works. + +(ert-deftest erc-scenarios-base-legacy-autojoin () + + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "base/legacy-autojoin") + (erc-d-linger-secs 1) + (erc-server-flood-penalty 0.1) + (dumb-server (erc-d-run "localhost" t 'foonet)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*")) + (erc-autojoin-channels-alist '(("libera\\.chat" "#erc") + ("foonet\\.org" "#chan")))) + + (ert-info ("Connect") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :password "changeme" + :full-name "tester") + (should (string= (buffer-name) (format "127.0.0.1:%d" port))))) + + (erc-d-t-wait-for 1 "server buffer renamed" (get-buffer "FooNet")) + + (ert-info ("Channel buffer #chan autojoined") + (with-current-buffer + (erc-d-t-wait-for 6 "#chan exists" (get-buffer "#chan")) + (erc-d-t-search-for 10 "Live, and be prosperous"))))) + +(ert-deftest erc-scenarios-services-password () + + (defvar erc-nickserv-passwords) + + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "services/password") + (erc-server-flood-penalty 0.1) + (erc-modules (cons 'services erc-modules)) + (erc-nickserv-passwords '((Libera.Chat (("joe" . "bar") + ("tester" . "changeme"))))) + (expect (erc-d-t-make-expecter)) + (dumb-server (erc-d-run "localhost" t 'libera)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*"))) + + (ert-info ("Connect without password") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :full-name "tester") + (should (string= (buffer-name) (format "127.0.0.1:%d" port))) + (erc-d-t-wait-for 2 "Network determined" + (eq erc-network 'Libera.Chat)) + (funcall expect 1 "This nickname is registered.") + (funcall expect 1 "You are now identified") + (funcall expect 1 "Last login from") + (erc-cmd-QUIT ""))) + + (erc-services-mode -1) + + (should-not (memq 'services erc-modules)))) + +(ert-deftest erc-scenarios-services-prompt () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "services/password") + (erc-server-flood-penalty 0.1) + (erc-modules (cons 'services erc-modules)) + (expect (erc-d-t-make-expecter)) + (dumb-server (erc-d-run "localhost" t 'libera)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*"))) + + (ert-info ("Connect without password") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :full-name "tester") + (should (string= (buffer-name) (format "127.0.0.1:%d" port))) + (ert-simulate-keys "changeme\r" + (erc-d-t-wait-for 2 "Network determined" + (eq erc-network 'Libera.Chat)) + (funcall expect 3 "This nickname is registered.") + (funcall expect 3 "You are now identified") + (funcall expect 3 "Last login from")) + (erc-cmd-QUIT ""))) + + (erc-services-mode -1) + + (should-not (memq 'services erc-modules)))) + +;; Corner case demoing fallback behavior for an absent 004 RPL but a +;; present 422 or 375. If this is unlikely enough, remove or guard +;; with `ert-skip' plus some condition so it only runs when explicitly +;; named via ERT specifier + +(ert-deftest erc-scenarios-networks-announced-missing () + (erc-scenarios-common-with-cleanup + ((erc-scenarios-common-dialog "networks/announced-missing") + (erc-d-linger-secs 0.5) + (expect (erc-d-t-make-expecter)) + (dumb-server (erc-d-run "localhost" t 'foonet)) + (port (process-contact dumb-server :service)) + (dumb-server-buffer (get-buffer "*erc-d-server*"))) + + (ert-info ("Connect without password") + (with-current-buffer (erc :server "127.0.0.1" + :port port + :nick "tester" + :full-name "tester") + (should (string= (buffer-name) (format "127.0.0.1:%d" port))) + (let ((err (should-error (sleep-for 1)))) + (should (string-match-p "Failed to determine" (cadr err)))) + (funcall expect 1 "Failed to determine") + (funcall expect 1 "Failed to determine") + (should-not erc-network) + (should (string= erc-server-announced-name "irc.foonet.org")))))) + ;;; erc-scenarios.el ends here -- 2.31.1