summaryrefslogtreecommitdiff
path: root/test/lisp/erc/erc-stamp-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/erc/erc-stamp-tests.el')
-rw-r--r--test/lisp/erc/erc-stamp-tests.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/lisp/erc/erc-stamp-tests.el b/test/lisp/erc/erc-stamp-tests.el
index ef292ccb618..5fee21ec28f 100644
--- a/test/lisp/erc/erc-stamp-tests.el
+++ b/test/lisp/erc/erc-stamp-tests.el
@@ -20,14 +20,14 @@
;;; Commentary:
;;; Code:
+(require 'erc-stamp)
+(require 'erc-goodies) ; for `erc-make-read-only'
+
(require 'ert-x)
(eval-and-compile
(let ((load-path (cons (ert-resource-directory) load-path)))
(require 'erc-tests-common)))
-(require 'erc-stamp)
-(require 'erc-goodies) ; for `erc-make-read-only'
-
;; These display-oriented tests are brittle because many factors
;; influence how text properties are applied. We should just
;; rework these into full scenarios.
@@ -46,7 +46,7 @@
(with-current-buffer (get-buffer-create "*erc-stamp-tests--insert-right*")
(erc-mode)
- (erc-munge-invisibility-spec)
+ (erc-stamp--manage-local-options-state)
(erc--initialize-markers (point) nil)
(erc-tests-common-init-server-proc "sleep" "1")
@@ -168,11 +168,11 @@
(put-text-property 0 (length msg) 'wrap-prefix 10 msg)
(erc-display-message nil nil (current-buffer) msg)))
(goto-char (point-min))
- ;; Space not added (treated as opaque string).
- (should (search-forward "msg one[" nil t))
- ;; Field covers stamp alone
+ ;; Leading space added as part of the stamp's field.
+ (should (search-forward "msg one [" nil t))
+ ;; Field covers stamp and space.
(should (eql ?e (char-before (field-beginning (point)))))
- ;; Vanity props extended
+ ;; Vanity props extended.
(should (get-text-property (field-beginning (point)) 'wrap-prefix))
(should (get-text-property (1+ (field-beginning (point))) 'wrap-prefix))
(should (get-text-property (1- (field-end (point))) 'wrap-prefix))
@@ -183,10 +183,10 @@
(erc-timestamp-right-column 20))
(let ((msg (erc-format-privmessage "bob" "tttt wwww oooo" nil t)))
(erc-display-message nil nil (current-buffer) msg)))
- ;; No hard wrap
- (should (search-forward "oooo[" nil t))
- ;; Field starts at format string (right bracket)
- (should (eql ?\[ (char-after (field-beginning (point)))))
+ ;; No hard wrap.
+ (should (search-forward "oooo [" nil t))
+ ;; Field starts at managed space before format string.
+ (should (eql ?\s (char-after (field-beginning (point)))))
(should (eql ?\n (char-after (field-end (point)))))))))
;; This concerns a proposed partial reversal of the changes resulting
@@ -235,7 +235,7 @@
(with-current-buffer (get-buffer-create "*erc-timestamp-intangible*")
(erc-mode)
(erc--initialize-markers (point) nil)
- (erc-munge-invisibility-spec)
+ (erc-stamp--manage-local-options-state)
(erc-display-message nil 'notice (current-buffer) "Welcome")
;;
;; Pretend `fill' is active and that these lines are