Compare case-folded nicks with erc-fill-wrap-merge
* lisp/erc/erc-fill.el (erc-fill--wrap-continued-message-p): Downcase both current and previous speaker when comparing nicks. * test/lisp/erc/erc-fill-tests.el (erc-fill-wrap--merge): Add title-case nick to test. * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update snapshot. * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update snapshot. (Bug#60936)
This commit is contained in:
parent
605414d018
commit
aa56253407
4 changed files with 12 additions and 6 deletions
|
@ -363,7 +363,8 @@ parties.")
|
|||
erc-fill--wrap-max-lull))
|
||||
(nick (buffer-substring-no-properties
|
||||
(1+ (point-min)) (- (point) 2)))
|
||||
((equal (car props) (erc-downcase nick)))))
|
||||
(props)
|
||||
((erc-nick-equal-p (car props) nick))))
|
||||
(set-marker erc-fill--wrap-last-msg (point-min))))
|
||||
|
||||
(defun erc-fill--wrap-stamp-insert-prefixed-date (args)
|
||||
|
|
|
@ -203,18 +203,23 @@
|
|||
(erc-fill-tests--wrap-populate
|
||||
|
||||
(lambda ()
|
||||
(erc-update-channel-member
|
||||
"#chan" "Dummy" "Dummy" t nil nil nil nil nil "fake" "~u" nil nil t)
|
||||
|
||||
;; Set this here so that the first few messages are from 1970
|
||||
(let ((erc-fill-tests--time-vals (lambda () 1680332400)))
|
||||
(erc-fill-tests--insert-privmsg "bob" "zero.")
|
||||
(erc-fill-tests--insert-privmsg "alice" "one.")
|
||||
(erc-fill-tests--insert-privmsg "alice" "two.")
|
||||
(erc-fill-tests--insert-privmsg "bob" "three.")
|
||||
(erc-fill-tests--insert-privmsg "bob" "four."))
|
||||
(erc-fill-tests--insert-privmsg "bob" "four.")
|
||||
(erc-fill-tests--insert-privmsg "Dummy" "five.")
|
||||
(erc-fill-tests--insert-privmsg "Dummy" "six."))
|
||||
|
||||
(should (= erc-fill--wrap-value 27))
|
||||
(erc-fill-tests--wrap-check-prefixes
|
||||
"*** " "<alice> " "<bob> "
|
||||
"<bob> " "<alice> " "<alice> " "<bob> " "<bob> ")
|
||||
"<bob> " "<alice> " "<alice> " "<bob> " "<bob> " "<Dummy> " "<Dummy> ")
|
||||
(erc-fill-tests--compare "merge-01-start")
|
||||
|
||||
(ert-info ("Shift right by one (plus)")
|
||||
|
@ -222,7 +227,7 @@
|
|||
(should (= erc-fill--wrap-value 29))
|
||||
(erc-fill-tests--wrap-check-prefixes
|
||||
"*** " "<alice> " "<bob> "
|
||||
"<bob> " "<alice> " "<alice> " "<bob> " "<bob> ")
|
||||
"<bob> " "<alice> " "<alice> " "<bob> " "<bob> " "<Dummy> " "<Dummy> ")
|
||||
(erc-fill-tests--compare "merge-02-right")))))
|
||||
|
||||
(ert-deftest erc-fill-wrap-visual-keys--body ()
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue