]> git.eshelyaron.com Git - emacs.git/commitdiff
; Add regression test for bug#65726
authorMattias Engdegård <mattiase@acm.org>
Tue, 5 Sep 2023 13:39:29 +0000 (15:39 +0200)
committerMattias Engdegård <mattiase@acm.org>
Tue, 5 Sep 2023 13:39:29 +0000 (15:39 +0200)
* test/src/regex-emacs-tests.el
(regex-tests-mutual-exclusive-inf-rec): New test.

test/src/regex-emacs-tests.el

index c8f161c9b24ce44f515a0879cb918de3257f4331..c074100e17f272e09ad6a7554452c20570b42983 100644 (file)
@@ -883,4 +883,8 @@ This evaluates the TESTS test cases from glibc."
     (should (looking-at "x*\\(=\\|:\\)*"))
     (should (looking-at "x*=*?"))))
 
+(ert-deftest regex-tests-mutual-exclusive-inf-rec ()
+  ;; Regression test for bug#65726, where this crashed Emacs.
+  (should (equal (string-match "a*\\(?:c\\|b*\\)*" "a") 0)))
+
 ;;; regex-emacs-tests.el ends here