aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorF. Jason Park2023-07-02 20:57:46 -0700
committerF. Jason Park2023-07-03 07:30:32 -0700
commitd0325e23099823f9f6e2575ef52940a69e8a6549 (patch)
treeba5ac2ab64c073dd97aad1fb681643256080b754 /test
parent14ae2101412d66576846d30ab32b4d5b0081383d (diff)
downloademacs-d0325e23099823f9f6e2575ef52940a69e8a6549.tar.gz
emacs-d0325e23099823f9f6e2575ef52940a69e8a6549.zip
Revert "Account for leading timestamps in erc-match"
This reverts commit 99d74dcd45938e2686d93eb5649800e14a88cd84 but keeps the test file test/lisp/erc/erc-scenarios-match.el. It also implements a partial alternative solution by undoing the reordering of insert hooks owned by the `stamp' and `match' modules. The initial reordering stems from d880a08f "Cement ordering of essential hook members in ERC" and was intended to address the problem of timestamps not being hidden in matched "fool" messages. However, a more comprehensive solution is being pursued as part of bug#64301. The following changes differ from those in a pure revert. * erc/ERC-NEWS: Fix erroneous claim about relative hook ordering pre-5.6. * lisp/erc/erc-match.el (erc-match-mode, erc-match-enable): Lower hook depth of `erc-match-message' in `erc-insert-modify-hook' from 60 to 50. (erc-text-matched-hook): Retain cleaned-up portion of revised doc string instead of reverting completely. * lisp/erc/erc-stamp.el (erc-stamp-mode, erc-stamp-enable): Raise depth of `erc-add-timestamp' in `erc-insert-modify-hook' and `erc-send-modify-hook' from 50 to 60. * test/lisp/erc/erc-scenarios-match.el (erc-scenarios-match--stamp-left-current-nick erc-scenarios-match--stamp-left-fools-invisible): Temporarily disable the latter and fix expected hook ordering. * test/lisp/erc/erc-tests.el (erc--essential-hook-ordering): Fix expected order of default insert hooks. (Bug#60936)
Diffstat (limited to 'test')
-rw-r--r--test/lisp/erc/erc-scenarios-match.el11
-rw-r--r--test/lisp/erc/erc-tests.el4
2 files changed, 9 insertions, 6 deletions
diff --git a/test/lisp/erc/erc-scenarios-match.el b/test/lisp/erc/erc-scenarios-match.el
index 49e6a3370fc..782907bfc30 100644
--- a/test/lisp/erc/erc-scenarios-match.el
+++ b/test/lisp/erc/erc-scenarios-match.el
@@ -49,8 +49,9 @@
49 :port port 49 :port port
50 :full-name "tester" 50 :full-name "tester"
51 :nick "tester") 51 :nick "tester")
52 (should (memq 'erc-match-message 52 ;; Module `timestamp' follows `match' in insertion hooks.
53 (memq 'erc-add-timestamp erc-insert-modify-hook))) 53 (should (memq 'erc-add-timestamp
54 (memq 'erc-match-message erc-insert-modify-hook)))
54 ;; The "match type" is `current-nick'. 55 ;; The "match type" is `current-nick'.
55 (funcall expect 5 "tester") 56 (funcall expect 5 "tester")
56 (should (eq (get-text-property (1- (point)) 'font-lock-face) 57 (should (eq (get-text-property (1- (point)) 'font-lock-face)
@@ -60,6 +61,7 @@
60;; some non-nil invisibility property spans the entire message. 61;; some non-nil invisibility property spans the entire message.
61(ert-deftest erc-scenarios-match--stamp-left-fools-invisible () 62(ert-deftest erc-scenarios-match--stamp-left-fools-invisible ()
62 :tags '(:expensive-test) 63 :tags '(:expensive-test)
64 (ert-skip "WIP: fix included in bug#64301")
63 (erc-scenarios-common-with-cleanup 65 (erc-scenarios-common-with-cleanup
64 ((erc-scenarios-common-dialog "join/legacy") 66 ((erc-scenarios-common-dialog "join/legacy")
65 (dumb-server (erc-d-run "localhost" t 'foonet)) 67 (dumb-server (erc-d-run "localhost" t 'foonet))
@@ -84,8 +86,9 @@
84 :full-name "tester" 86 :full-name "tester"
85 :password "changeme" 87 :password "changeme"
86 :nick "tester") 88 :nick "tester")
87 (should (memq 'erc-match-message 89 ;; Module `timestamp' follows `match' in insertion hooks.
88 (memq 'erc-add-timestamp erc-insert-modify-hook))) 90 (should (memq 'erc-add-timestamp
91 (memq 'erc-match-message erc-insert-modify-hook)))
89 (funcall expect 5 "This server is in debug mode"))) 92 (funcall expect 5 "This server is in debug mode")))
90 93
91 (ert-info ("Ensure lines featuring \"bob\" are invisible") 94 (ert-info ("Ensure lines featuring \"bob\" are invisible")
diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el
index b751ef50520..80c7c708fc5 100644
--- a/test/lisp/erc/erc-tests.el
+++ b/test/lisp/erc/erc-tests.el
@@ -1851,8 +1851,8 @@
1851 '( :erc-insert-modify-hook (erc-controls-highlight ; 0 1851 '( :erc-insert-modify-hook (erc-controls-highlight ; 0
1852 erc-button-add-buttons ; 30 1852 erc-button-add-buttons ; 30
1853 erc-fill ; 40 1853 erc-fill ; 40
1854 erc-add-timestamp ; 50 1854 erc-match-message ; 50
1855 erc-match-message) ; 60 1855 erc-add-timestamp) ; 60
1856 1856
1857 :erc-send-modify-hook ( erc-controls-highlight ; 0 1857 :erc-send-modify-hook ( erc-controls-highlight ; 0
1858 erc-button-add-buttons ; 30 1858 erc-button-add-buttons ; 30