summaryrefslogtreecommitdiff
path: root/test/lisp/help-tests.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-11-06 19:35:31 +0100
committerStefan Kangas <stefan@marxist.se>2021-11-06 19:35:31 +0100
commitb8b0e529a8f1dcea9a219ce8b2f66bb3e0be17bd (patch)
treea6392ed0bcf6e7094ca793816125483f9832bb72 /test/lisp/help-tests.el
parent83422370c87000f3d6d89320d4947c24325c9ad2 (diff)
downloademacs-b8b0e529a8f1dcea9a219ce8b2f66bb3e0be17bd.tar.gz
emacs-b8b0e529a8f1dcea9a219ce8b2f66bb3e0be17bd.tar.bz2
emacs-b8b0e529a8f1dcea9a219ce8b2f66bb3e0be17bd.zip
; * test/lisp/help-tests.el: Fix failing tests after recent change.
Diffstat (limited to 'test/lisp/help-tests.el')
-rw-r--r--test/lisp/help-tests.el66
1 files changed, 33 insertions, 33 deletions
diff --git a/test/lisp/help-tests.el b/test/lisp/help-tests.el
index 6bafd8e7ddc..a2573c9c8b3 100644
--- a/test/lisp/help-tests.el
+++ b/test/lisp/help-tests.el
@@ -90,16 +90,16 @@
(ert-deftest help-tests-substitute-command-keys/keymaps ()
(with-substitute-command-keys-test
- (test "\\{minibuffer-local-must-match-map}"
+ (test-re "\\{minibuffer-local-must-match-map}"
"
Key Binding
-
+-+
C-g abort-minibuffers
TAB minibuffer-complete
C-j minibuffer-complete-and-exit
RET minibuffer-complete-and-exit
SPC minibuffer-complete-word
-? minibuffer-completion-help
+\\? minibuffer-completion-help
C-<tab> file-cache-minibuffer-complete
<XF86Back> previous-history-element
<XF86Forward> next-history-element
@@ -243,10 +243,10 @@ M-g M-c switch-to-completions
(with-substitute-command-keys-test
(with-temp-buffer
(help-tests-major-mode)
- (test "\\{help-tests-major-mode-map}"
+ (test-re "\\{help-tests-major-mode-map}"
"
Key Binding
-
+-+
( .. ) short-range
1 .. 4 foo-range
a .. c foo-other-range
@@ -261,10 +261,10 @@ x foo-original
(with-temp-buffer
(help-tests-major-mode)
(help-tests-minor-mode)
- (test "\\{help-tests-major-mode-map}"
+ (test-re "\\{help-tests-major-mode-map}"
"
Key Binding
-
+-+
( .. ) short-range
1 .. 4 foo-range
a .. c foo-other-range
@@ -282,10 +282,10 @@ x foo-original
(with-temp-buffer
(help-tests-major-mode)
(define-key help-tests-major-mode-map [remap foo] 'bar)
- (test "\\{help-tests-major-mode-map}"
+ (test-re "\\{help-tests-major-mode-map}"
"
Key Binding
-
+-+
<remap> <foo> bar
")))))
@@ -298,11 +298,11 @@ Key Binding
:enable mark-active
:help "Help text"))))))
(describe-map-tree map nil nil nil nil t nil nil nil)
- (should (equal (buffer-string) "
+ (should (string-match "
Key Binding
-
-C-a foo
-")))))
+-+
+C-a foo\n"
+ (buffer-string))))))
(ert-deftest help-tests-describe-map-tree/no-menu-nil ()
(with-temp-buffer
@@ -313,13 +313,13 @@ C-a foo
:enable mark-active
:help "Help text"))))))
(describe-map-tree map nil nil nil nil nil nil nil nil)
- (should (equal (buffer-string) "
+ (should (string-match "
Key Binding
-
+-+
C-a foo
-<menu-bar> <foo> foo
-")))))
+<menu-bar> <foo> foo\n"
+ (buffer-string))))))
(ert-deftest help-tests-describe-map-tree/mention-shadow-t ()
(with-temp-buffer
@@ -328,13 +328,13 @@ C-a foo
(2 . bar))))
(shadow-maps '((keymap . ((1 . baz))))))
(describe-map-tree map t shadow-maps nil nil t nil nil t)
- (should (equal (buffer-string) "
+ (should (string-match "
Key Binding
-
+-+
C-a foo
(this binding is currently shadowed)
-C-b bar
-")))))
+C-b bar\n"
+ (buffer-string))))))
(ert-deftest help-tests-describe-map-tree/mention-shadow-nil ()
(with-temp-buffer
@@ -343,11 +343,11 @@ C-b bar
(2 . bar))))
(shadow-maps '((keymap . ((1 . baz))))))
(describe-map-tree map t shadow-maps nil nil t nil nil nil)
- (should (equal (buffer-string) "
+ (should (string-match "
Key Binding
-
-C-b bar
-")))))
+-+
+C-b bar\n"
+ (buffer-string))))))
(ert-deftest help-tests-describe-map-tree/partial-t ()
(with-temp-buffer
@@ -355,11 +355,11 @@ C-b bar
(map '(keymap . ((1 . foo)
(2 . undefined)))))
(describe-map-tree map t nil nil nil nil nil nil nil)
- (should (equal (buffer-string) "
+ (should (string-match "
Key Binding
-
-C-a foo
-")))))
+-+
+C-a foo\n"
+ (buffer-string))))))
(ert-deftest help-tests-describe-map-tree/partial-nil ()
(with-temp-buffer
@@ -367,12 +367,12 @@ C-a foo
(map '(keymap . ((1 . foo)
(2 . undefined)))))
(describe-map-tree map nil nil nil nil nil nil nil nil)
- (should (equal (buffer-string) "
+ (should (string-match "
Key Binding
-
+-+
C-a foo
-C-b undefined
-")))))
+C-b undefined\n"
+ (buffer-string))))))
(defvar help-tests--was-in-buffer nil)