mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix (rx-to-string (and (literal STR) (regexp STR)) regression
* lisp/emacs-lisp/rx.el (rx-regexp, rx-literal): Check the cadr of the form for stringness, not the form itself. * test/lisp/emacs-lisp/rx-tests.el (rx-to-string-lisp-forms): New test.
This commit is contained in:
parent
260b6c2c93
commit
9233865b70
2 changed files with 6 additions and 2 deletions
|
|
@ -156,5 +156,9 @@
|
|||
(rx-tests--match (rx "c" (minimal-match (0+ (regexp ad))) "a") "cdaaada" "cda")
|
||||
(rx-tests--match (rx "c" (maximal-match (0+ (regexp ad))) "a") "cdaaada" "cdaaada")))
|
||||
|
||||
(ert-deftest rx-to-string-lisp-forms ()
|
||||
(rx-tests--match (rx-to-string '(seq "a" (literal "b") "c")) "abc")
|
||||
(rx-tests--match (rx-to-string '(seq "a" (regexp "b") "c")) "abc"))
|
||||
|
||||
(provide 'rx-tests)
|
||||
;; rx-tests.el ends here.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue