mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-15 09:47:20 +00:00
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.
This commit is contained in:
parent
962562cde4
commit
c7ac76603f
@ -63,6 +63,7 @@
|
||||
(ert-deftest rx-char-any ()
|
||||
"Test character alternatives with `]' and `-' (Bug#25123)."
|
||||
(should (equal
|
||||
;; relint suppression: Range .<-]. overlaps previous .]-{
|
||||
(rx string-start (1+ (char (?\] . ?\{) (?< . ?\]) (?- . ?:)))
|
||||
string-end)
|
||||
"\\`[.-:<-{-]+\\'")))
|
||||
@ -127,6 +128,10 @@
|
||||
"[[:lower:][:upper:]-][^[:lower:][:upper:]-]"))
|
||||
(should (equal (rx (any "]" lower upper) (not (any "]" lower upper)))
|
||||
"[][:lower:][:upper:]][^][:lower:][:upper:]]"))
|
||||
;; relint suppression: Duplicated character .-.
|
||||
;; relint suppression: Single-character range .f-f
|
||||
;; relint suppression: Range .--/. overlaps previous .-
|
||||
;; relint suppression: Range .\*--. overlaps previous .--/
|
||||
(should (equal (rx (any "-a" "c-" "f-f" "--/*--"))
|
||||
"[*-/acf]"))
|
||||
(should (equal (rx (any "]-a" ?-) (not (any "]-a" ?-)))
|
||||
@ -140,6 +145,7 @@
|
||||
"\\`a\\`[^z-a]"))
|
||||
(should (equal (rx (any "") (not (any "")))
|
||||
"\\`a\\`[^z-a]"))
|
||||
;; relint suppression: Duplicated class .space.
|
||||
(should (equal (rx (any space ?a digit space))
|
||||
"[a[:space:][:digit:]]"))
|
||||
(should (equal (rx (not "\n") (not ?\n) (not (any "\n")) (not-char ?\n)
|
||||
|
Loading…
Reference in New Issue
Block a user