summaryrefslogtreecommitdiff
path: root/test/src/regex-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/src/regex-tests.el')
-rw-r--r--test/src/regex-tests.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/src/regex-tests.el b/test/src/regex-tests.el
index 86aa7d26350..083ed5c4c8c 100644
--- a/test/src/regex-tests.el
+++ b/test/src/regex-tests.el
@@ -677,4 +677,10 @@ This evaluates the PTESTS test cases from glibc."
This evaluates the TESTS test cases from glibc."
(should-not (regex-tests-TESTS)))
+(ert-deftest regex-repeat-limit ()
+ "Test the #xFFFF repeat limit."
+ (should (string-match "\\`x\\{65535\\}" (make-string 65535 ?x)))
+ (should-not (string-match "\\`x\\{65535\\}" (make-string 65534 ?x)))
+ (should-error (string-match "\\`x\\{65536\\}" "X") :type 'invalid-regexp))
+
;;; regex-tests.el ends here