summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-07-30 12:19:32 -0400
committerEli Zaretskii <eliz@gnu.org>2023-07-30 12:19:32 -0400
commit1198cdb55673d5f5545ee0ec9008b9832b830f06 (patch)
tree0a4db545f64735ba6255b9a050b31e07b552f1cd /test/lisp/emacs-lisp
parent23fc4793001e4de920bb8dae280133f4467a7797 (diff)
parent2b8796eea1979fe6891ab9d80cd126fe8980167a (diff)
downloademacs-1198cdb55673d5f5545ee0ec9008b9832b830f06.tar.gz
emacs-1198cdb55673d5f5545ee0ec9008b9832b830f06.tar.bz2
emacs-1198cdb55673d5f5545ee0ec9008b9832b830f06.zip
Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/rx-tests.el20
1 files changed, 15 insertions, 5 deletions
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el
index 028250b7352..9c8628a8f26 100644
--- a/test/lisp/emacs-lisp/rx-tests.el
+++ b/test/lisp/emacs-lisp/rx-tests.el
@@ -112,23 +112,33 @@
(should (equal (rx (any "]" "^") (any "]" "-") (any "-" "^")
(not (any "]" "^")) (not (any "]" "-"))
(not (any "-" "^")))
- "[]^][]-][-^][^]^][^]-][^-^]"))
+ "[]^][]-][-^][^]^][^]-][^^-]"))
(should (equal (rx (any "]" "^" "-") (not (any "]" "^" "-")))
"[]^-][^]^-]"))
+ (should (equal (rx (any "^-f") (any "^-f" "-")
+ (any "^-f" "z") (any "^-f" "z" "-"))
+ "[_-f^][_-f^-][_-f^z][_-f^z-]"))
+ (should (equal (rx (not (any "^-f")) (not (any "^-f" "-"))
+ (not (any "^-f" "z")) (not (any "^-f" "z" "-")))
+ "[^^-f][^^-f-][^^-fz][^^-fz-]"))
+ (should (equal (rx (any "^-f" word) (any "^-f" "-" word))
+ "[_-f^[:word:]][_-f^[:word:]-]"))
+ (should (equal (rx (not (any "^-f" word)) (not (any "^-f" "-" word)))
+ "[^^-f[:word:]][^^-f[:word:]-]"))
(should (equal (rx (any "-" ascii) (any "^" ascii) (any "]" ascii))
"[[:ascii:]-][[:ascii:]^][][:ascii:]]"))
(should (equal (rx (not (any "-" ascii)) (not (any "^" ascii))
(not (any "]" ascii)))
- "[^[:ascii:]-][^[:ascii:]^][^][:ascii:]]"))
+ "[^[:ascii:]-][^^[:ascii:]][^][:ascii:]]"))
(should (equal (rx (any "-]" ascii) (any "^]" ascii) (any "-^" ascii))
"[][:ascii:]-][]^[:ascii:]][[:ascii:]^-]"))
(should (equal (rx (not (any "-]" ascii)) (not (any "^]" ascii))
(not (any "-^" ascii)))
- "[^][:ascii:]-][^]^[:ascii:]][^[:ascii:]^-]"))
+ "[^][:ascii:]-][^]^[:ascii:]][^^[:ascii:]-]"))
(should (equal (rx (any "-]^" ascii) (not (any "-]^" ascii)))
"[]^[:ascii:]-][^]^[:ascii:]-]"))
(should (equal (rx (any "^" lower upper) (not (any "^" lower upper)))
- "[[:lower:]^[:upper:]][^[:lower:]^[:upper:]]"))
+ "[[:lower:]^[:upper:]][^^[:lower:][:upper:]]"))
(should (equal (rx (any "-" lower upper) (not (any "-" lower upper)))
"[[:lower:][:upper:]-][^[:lower:][:upper:]-]"))
(should (equal (rx (any "]" lower upper) (not (any "]" lower upper)))
@@ -143,7 +153,7 @@
"[]-a-][^]-a-]"))
(should (equal (rx (any "--]") (not (any "--]"))
(any "-" "^-a") (not (any "-" "^-a")))
- "[].-\\-][^].-\\-][-^-a][^-^-a]"))
+ "[].-\\-][^].-\\-][_-a^-][^^-a-]"))
(should (equal (rx (not (any "!a" "0-8" digit nonascii)))
"[^!0-8a[:digit:][:nonascii:]]"))
(should (equal (rx (any) (not (any)))