aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMattias EngdegÄrd2020-01-24 21:01:47 +0100
committerMattias EngdegÄrd2020-01-24 23:04:34 +0100
commit0c6c8aa002d321db61afdd14c70744f7bc27f268 (patch)
treecf079a7723cd6078f2260bb5c7bb0f4bd4183b17 /test
parenta391ffa2f0377306449b36cc62858db823d2e990 (diff)
downloademacs-0c6c8aa002d321db61afdd14c70744f7bc27f268.tar.gz
emacs-0c6c8aa002d321db61afdd14c70744f7bc27f268.zip
Remove (or double) redundant backslashes in string literals
See discussion at https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00749.html . * lisp/obsolete/iswitchb.el (iswitchb-summaries-to-end): * test/src/regex-emacs-tests.el (regex-tests-BOOST-frob-escapes): * test/lisp/help-fns-tests.el (help-fns-test-lisp-macro) (help-fns-test-lisp-defun, help-fns-test-lisp-defsubst) (help-fns-test-alias-to-defun, help-fns-test-bug23887): Double backslashes for desired effect. * lisp/org/ol.el (org-link-escape): * lisp/net/nsm.el (nsm-protocol-check--rsa-kx) (nsm-protocol-check--anon-kx, nsm-protocol-check--sha1-sig): * lisp/obsolete/old-whitespace.el (whitespace-buffer): * lisp/obsolete/rcompile.el (remote-compile-run-before): * lisp/obsolete/vi.el (vi-end-of-blank-delimited-word): * lisp/obsolete/vip.el (vip-current-major-mode) (vip-paren-match, vip-switch-to-buffer) (vip-switch-to-buffer-other-window, vip-kill-buffer) (vip-get-ex-token, ex-edit): * lisp/org/org-element.el (org-element--cache-sync-requests): * lisp/org/org.el (org-sparse-tree): * lisp/textmodes/reftex.el (reftex-report-bug): * test/lisp/ibuffer-tests.el (ibuffer-save-filters): * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--insert-failing-lines): * test/lisp/simple-tests.el (undo-test-kill-c-a-then-undo): * test/lisp/textmodes/conf-mode-tests.el (conf-test-toml-mode): * test/src/regex-emacs-tests.el (regex-tests-compare): Remove redundant backslashes.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/help-fns-tests.el10
-rw-r--r--test/lisp/ibuffer-tests.el2
-rw-r--r--test/lisp/international/ucs-normalize-tests.el2
-rw-r--r--test/lisp/simple-tests.el2
-rw-r--r--test/lisp/textmodes/conf-mode-tests.el2
-rw-r--r--test/src/regex-emacs-tests.el4
6 files changed, 11 insertions, 11 deletions
diff --git a/test/lisp/help-fns-tests.el b/test/lisp/help-fns-tests.el
index 4c808d8372e..ef42d4bda29 100644
--- a/test/lisp/help-fns-tests.el
+++ b/test/lisp/help-fns-tests.el
@@ -56,28 +56,28 @@ Return first line of the output of (describe-function-1 FUNC)."
56 (should (string-match regexp result)))) 56 (should (string-match regexp result))))
57 57
58(ert-deftest help-fns-test-lisp-macro () 58(ert-deftest help-fns-test-lisp-macro ()
59 (let ((regexp "a Lisp macro in .subr\.el") 59 (let ((regexp "a Lisp macro in .subr\\.el")
60 (result (help-fns-tests--describe-function 'when))) 60 (result (help-fns-tests--describe-function 'when)))
61 (should (string-match regexp result)))) 61 (should (string-match regexp result))))
62 62
63(ert-deftest help-fns-test-lisp-defun () 63(ert-deftest help-fns-test-lisp-defun ()
64 (let ((regexp "a compiled Lisp function in .subr\.el") 64 (let ((regexp "a compiled Lisp function in .subr\\.el")
65 (result (help-fns-tests--describe-function 'last))) 65 (result (help-fns-tests--describe-function 'last)))
66 (should (string-match regexp result)))) 66 (should (string-match regexp result))))
67 67
68(ert-deftest help-fns-test-lisp-defsubst () 68(ert-deftest help-fns-test-lisp-defsubst ()
69 (let ((regexp "a compiled Lisp function in .subr\.el") 69 (let ((regexp "a compiled Lisp function in .subr\\.el")
70 (result (help-fns-tests--describe-function 'posn-window))) 70 (result (help-fns-tests--describe-function 'posn-window)))
71 (should (string-match regexp result)))) 71 (should (string-match regexp result))))
72 72
73(ert-deftest help-fns-test-alias-to-defun () 73(ert-deftest help-fns-test-alias-to-defun ()
74 (let ((regexp "an alias for .set-file-modes. in .subr\.el") 74 (let ((regexp "an alias for .set-file-modes. in .subr\\.el")
75 (result (help-fns-tests--describe-function 'chmod))) 75 (result (help-fns-tests--describe-function 'chmod)))
76 (should (string-match regexp result)))) 76 (should (string-match regexp result))))
77 77
78(ert-deftest help-fns-test-bug23887 () 78(ert-deftest help-fns-test-bug23887 ()
79 "Test for https://debbugs.gnu.org/23887 ." 79 "Test for https://debbugs.gnu.org/23887 ."
80 (let ((regexp "an alias for .re-search-forward. in .subr\.el") 80 (let ((regexp "an alias for .re-search-forward. in .subr\\.el")
81 (result (help-fns-tests--describe-function 'search-forward-regexp))) 81 (result (help-fns-tests--describe-function 'search-forward-regexp)))
82 (should (string-match regexp result)))) 82 (should (string-match regexp result))))
83 83
diff --git a/test/lisp/ibuffer-tests.el b/test/lisp/ibuffer-tests.el
index 8dadb920547..2211cae305b 100644
--- a/test/lisp/ibuffer-tests.el
+++ b/test/lisp/ibuffer-tests.el
@@ -82,7 +82,7 @@
82 (test1 '((mode . org-mode) 82 (test1 '((mode . org-mode)
83 (or (size-gt . 10000) 83 (or (size-gt . 10000)
84 (and (not (starred-name)) 84 (and (not (starred-name))
85 (directory . "\<org\>"))))) 85 (directory . "<org>")))))
86 (test2 '((or (mode . emacs-lisp-mode) (file-extension . "elc?") 86 (test2 '((or (mode . emacs-lisp-mode) (file-extension . "elc?")
87 (and (starred-name) (name . "elisp")) 87 (and (starred-name) (name . "elisp"))
88 (mode . lisp-interaction-mode)))) 88 (mode . lisp-interaction-mode))))
diff --git a/test/lisp/international/ucs-normalize-tests.el b/test/lisp/international/ucs-normalize-tests.el
index 82ea2078f16..ec77e65271d 100644
--- a/test/lisp/international/ucs-normalize-tests.el
+++ b/test/lisp/international/ucs-normalize-tests.el
@@ -299,7 +299,7 @@ implementations:
299 (list " var var)) 299 (list " var var))
300 (dolist (linos (seq-partition newval 8)) 300 (dolist (linos (seq-partition newval 8))
301 (insert (mapconcat #'number-to-string linos " ") "\n")) 301 (insert (mapconcat #'number-to-string linos " ") "\n"))
302 (insert ")\)")) 302 (insert "))"))
303 303
304(defun ucs-normalize-check-failing-lines () 304(defun ucs-normalize-check-failing-lines ()
305 (interactive) 305 (interactive)
diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el
index 276df795fca..ae201465678 100644
--- a/test/lisp/simple-tests.el
+++ b/test/lisp/simple-tests.el
@@ -427,7 +427,7 @@ See bug#35036."
427 (with-temp-buffer 427 (with-temp-buffer
428 (switch-to-buffer (current-buffer)) 428 (switch-to-buffer (current-buffer))
429 (setq buffer-undo-list nil) 429 (setq buffer-undo-list nil)
430 (insert "a\nb\n\c\n") 430 (insert "a\nb\nc\n")
431 (goto-char (point-max)) 431 (goto-char (point-max))
432 ;; We use a keyboard macro because it adds undo events in the same 432 ;; We use a keyboard macro because it adds undo events in the same
433 ;; way as if a user were involved. 433 ;; way as if a user were involved.
diff --git a/test/lisp/textmodes/conf-mode-tests.el b/test/lisp/textmodes/conf-mode-tests.el
index 814cb06b960..7e870269959 100644
--- a/test/lisp/textmodes/conf-mode-tests.el
+++ b/test/lisp/textmodes/conf-mode-tests.el
@@ -162,7 +162,7 @@ image/tiff tiff tif
162(ert-deftest conf-test-toml-mode () 162(ert-deftest conf-test-toml-mode ()
163 ;; From `conf-toml-mode' docstring. 163 ;; From `conf-toml-mode' docstring.
164 (with-temp-buffer 164 (with-temp-buffer
165 (insert "\[entry] 165 (insert "[entry]
166value = \"some string\"") 166value = \"some string\"")
167 (goto-char (point-min)) 167 (goto-char (point-min))
168 (conf-toml-mode) 168 (conf-toml-mode)
diff --git a/test/src/regex-emacs-tests.el b/test/src/regex-emacs-tests.el
index 6a661afeff9..ad0271049c3 100644
--- a/test/src/regex-emacs-tests.el
+++ b/test/src/regex-emacs-tests.el
@@ -161,7 +161,7 @@ what failed, if anything; valid values are 'search-failed,
161'compilation-failed and nil. I compare the beginning/end of each 161'compilation-failed and nil. I compare the beginning/end of each
162group with their expected values. This is done with either 162group with their expected values. This is done with either
163BOUNDS-REF or SUBSTRING-REF; one of those should be non-nil. 163BOUNDS-REF or SUBSTRING-REF; one of those should be non-nil.
164BOUNDS-REF is a sequence \[start-ref0 end-ref0 start-ref1 164BOUNDS-REF is a sequence [start-ref0 end-ref0 start-ref1
165end-ref1 ....] while SUBSTRING-REF is the expected substring 165end-ref1 ....] while SUBSTRING-REF is the expected substring
166obtained by indexing the input string by start/end-ref. 166obtained by indexing the input string by start/end-ref.
167 167
@@ -327,7 +327,7 @@ emacs requires an extra symbol character"
327(defun regex-tests-BOOST-frob-escapes (s ispattern) 327(defun regex-tests-BOOST-frob-escapes (s ispattern)
328 "Mangle \\ the way it is done in frob_escapes() in 328 "Mangle \\ the way it is done in frob_escapes() in
329regex-tests-BOOST.c in glibc: \\t, \\n, \\r are interpreted; 329regex-tests-BOOST.c in glibc: \\t, \\n, \\r are interpreted;
330\\\\, \\^, \{, \\|, \} are unescaped for the string (not 330\\\\, \\^, \\{, \\|, \\} are unescaped for the string (not
331pattern)" 331pattern)"
332 332
333 ;; this is all similar to (regex-tests-unextend) 333 ;; this is all similar to (regex-tests-unextend)