Index: test/webkit/fast/regex/early-acid3-86.js |
diff --git a/test/webkit/toString-recursion.js b/test/webkit/fast/regex/early-acid3-86.js |
similarity index 80% |
copy from test/webkit/toString-recursion.js |
copy to test/webkit/fast/regex/early-acid3-86.js |
index 51e9f98c2d28665b9a969aa801aacad83c548856..488364f0b3adcab0cf181764694c1eeed2cd6a7e 100644 |
--- a/test/webkit/toString-recursion.js |
+++ b/test/webkit/fast/regex/early-acid3-86.js |
@@ -22,14 +22,12 @@ |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
description( |
-"This test checks that toString() does not have a problem when an object has itself as a property." |
+'Test that covers capturing brackets, and was adapted from a part of an early version of Acid3.' |
); |
-// Array (elements) |
-shouldBe("var array = []; array[0] = array; array + ''", "''"); |
- |
-// Error (name, message) |
-shouldBe("var error = new Error; error.name = error; error.message = error; error + ''", "''"); |
- |
-// RegExp (source) |
-shouldBe("var regexp = /a/; regexp.source = regexp; regexp + ''", "'/a/'"); |
+// JS regexps aren't like Perl regexps, if their character |
+// classes start with a ] that means they're empty. So this |
+// is a syntax error; if we get here it's a bug. |
+shouldThrow("/TA[])]/.exec('TA]')"); |
+shouldBe("/[]/.exec('')", "null"); |
+shouldBe("/(\\3)(\\1)(a)/.exec('cat').toString()", "'a,,,a'"); |