]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - tests/stress/large-regexp.js
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / tests / stress / large-regexp.js
diff --git a/tests/stress/large-regexp.js b/tests/stress/large-regexp.js
new file mode 100644 (file)
index 0000000..8349bed
--- /dev/null
@@ -0,0 +1,11 @@
+if (''.match(/(,9111111111{2257483648,}[:lower:])|(ab)/))
+    throw new Error("Incorrect result, should not have matched")
+
+if (''.match(/(1{1,2147483648})|(ab)/))
+    throw new Error("Incorrect result, should not have matched")
+
+if (''.match(/(1{2147480000,}2{3648,})|(ab)/))
+    throw new Error("Incorrect result, should not have matched")
+
+if (!'1234'.match(/1{1,2147483645}2{1,2147483645}3{1,2147483645}4{1,2147483645}/))
+    throw new Error("Incorrect result, should have matched")