aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias EngdegÄrd2020-04-05 15:13:44 +0200
committerMattias EngdegÄrd2020-04-05 15:16:32 +0200
commitc7ac76603f291d432586abd2eeb75e1ca6e54863 (patch)
treef3f0de8f3e31eb458815059fd3d8e86cf70eaaf5
parent962562cde45071f74a37854a299e88470a4ecd49 (diff)
downloademacs-c7ac76603f291d432586abd2eeb75e1ca6e54863.tar.gz
emacs-c7ac76603f291d432586abd2eeb75e1ca6e54863.zip
Suppress relint diagnostics in rx-tests.el
* test/lisp/emacs-lisp/rx-tests.el (rx-char-any, rx-any): Suppress relint complaints; these regexps are intentionally bad.
-rw-r--r--test/lisp/emacs-lisp/rx-tests.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el
index 0fece4004bd..0e6f27836ea 100644
--- a/test/lisp/emacs-lisp/rx-tests.el
+++ b/test/lisp/emacs-lisp/rx-tests.el
@@ -63,6 +63,7 @@
63(ert-deftest rx-char-any () 63(ert-deftest rx-char-any ()
64 "Test character alternatives with `]' and `-' (Bug#25123)." 64 "Test character alternatives with `]' and `-' (Bug#25123)."
65 (should (equal 65 (should (equal
66 ;; relint suppression: Range .<-]. overlaps previous .]-{
66 (rx string-start (1+ (char (?\] . ?\{) (?< . ?\]) (?- . ?:))) 67 (rx string-start (1+ (char (?\] . ?\{) (?< . ?\]) (?- . ?:)))
67 string-end) 68 string-end)
68 "\\`[.-:<-{-]+\\'"))) 69 "\\`[.-:<-{-]+\\'")))
@@ -127,6 +128,10 @@
127 "[[:lower:][:upper:]-][^[:lower:][:upper:]-]")) 128 "[[:lower:][:upper:]-][^[:lower:][:upper:]-]"))
128 (should (equal (rx (any "]" lower upper) (not (any "]" lower upper))) 129 (should (equal (rx (any "]" lower upper) (not (any "]" lower upper)))
129 "[][:lower:][:upper:]][^][:lower:][:upper:]]")) 130 "[][:lower:][:upper:]][^][:lower:][:upper:]]"))
131 ;; relint suppression: Duplicated character .-.
132 ;; relint suppression: Single-character range .f-f
133 ;; relint suppression: Range .--/. overlaps previous .-
134 ;; relint suppression: Range .\*--. overlaps previous .--/
130 (should (equal (rx (any "-a" "c-" "f-f" "--/*--")) 135 (should (equal (rx (any "-a" "c-" "f-f" "--/*--"))
131 "[*-/acf]")) 136 "[*-/acf]"))
132 (should (equal (rx (any "]-a" ?-) (not (any "]-a" ?-))) 137 (should (equal (rx (any "]-a" ?-) (not (any "]-a" ?-)))
@@ -140,6 +145,7 @@
140 "\\`a\\`[^z-a]")) 145 "\\`a\\`[^z-a]"))
141 (should (equal (rx (any "") (not (any ""))) 146 (should (equal (rx (any "") (not (any "")))
142 "\\`a\\`[^z-a]")) 147 "\\`a\\`[^z-a]"))
148 ;; relint suppression: Duplicated class .space.
143 (should (equal (rx (any space ?a digit space)) 149 (should (equal (rx (any space ?a digit space))
144 "[a[:space:][:digit:]]")) 150 "[a[:space:][:digit:]]"))
145 (should (equal (rx (not "\n") (not ?\n) (not (any "\n")) (not-char ?\n) 151 (should (equal (rx (not "\n") (not ?\n) (not (any "\n")) (not-char ?\n)