summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js')
-rw-r--r--JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js b/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js
index 16f265c..3eb51cb 100644
--- a/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js
+++ b/JavaScriptCore/tests/mozilla/ecma_2/RegExp/properties-001.js
@@ -56,8 +56,15 @@ function AddRegExpCases( re, s, g, i, m, l ) {
s,
re.source );
+/*
+ * http://bugzilla.mozilla.org/show_bug.cgi?id=225550 changed
+ * the behavior of toString() and toSource() on empty regexps.
+ * So branch if |s| is the empty string -
+ */
+ var S = s? s : '(?:)';
+
AddTestCase( re + ".toString()",
- "/" + s +"/" + (g?"g":"") + (i?"i":"") +(m?"m":""),
+ "/" + S +"/" + (g?"g":"") + (i?"i":"") +(m?"m":""),
re.toString() );
AddTestCase( re + ".global",