summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/auto-regress/bug748119.js
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/jit-test/tests/auto-regress/bug748119.js
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/jit-test/tests/auto-regress/bug748119.js')
-rw-r--r--js/src/jit-test/tests/auto-regress/bug748119.js95
1 files changed, 95 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/auto-regress/bug748119.js b/js/src/jit-test/tests/auto-regress/bug748119.js
new file mode 100644
index 000000000..759db8cb1
--- /dev/null
+++ b/js/src/jit-test/tests/auto-regress/bug748119.js
@@ -0,0 +1,95 @@
+// Binary: cache/js-dbg-32-17af008937e3-linux
+// Flags: -m -n -a
+//
+var lfcode = new Array();
+lfcode.push("\
+var gTestcases = new Array();\
+var gTc = gTestcases.length;\
+function TestCase(n, d, e, a) {\
+ this.passed = getTestCaseResult(e, a);\
+ this.bugnumber = typeof(BUGNUMER) != 'undefined' ? BUGNUMBER : '';\
+ gTestcases[gTc++] = this;\
+}\
+for (var i=0; i<len; i++) {}\
+function reportCompare (expected, actual, description) {\
+ var testcase = new TestCase(\"unknown-test-name\", description, expected, actual);\
+ if (testcase.passed)\
+ printStatus (\"Expected match to '\" + toPrinted(expectedRegExp) + \"' matched actual value '\" + toPrinted(actual) + \"'\");\
+}\
+function getTestCaseResult(expected, actual)\
+function stopTest() {}\
+");
+lfcode.push("\
+var UBound = 0;\
+var TEST_PASSED = 'SyntaxError';\
+var TEST_FAILED = 'Generated an error, but NOT a SyntaxError!';\
+var statusitems = [];\
+var actualvalues = [];\
+var expectedvalues = [];\
+testThis(' /a**/ ');\
+testThis(' /a***/ ');\
+testThis(' /a++/ ');\
+testThis(' /a+++/ ');\
+testThis(' /a???/ ');\
+testThis(' /a????/ ');\
+testThis(' /+a/ ');\
+testThis(' /++a/ ');\
+testThis(' /?a/ ');\
+testThis(' /??a/ ');\
+testThis(' /x{1}{1}/ ');\
+testThis(' /x{1,}{1}/ ');\
+testThis(' /x{1,2}{1}/ ');\
+testThis(' /x{1}{1,}/ ');\
+testThis(' /x{1,}{1,}/ ');\
+testThis(' /x{1,2}{1,}/ ');\
+testThis(' /x{1}{1,2}/ ');\
+testThis(' /x{1,}{1,2}/ ');\
+function testThis(sInvalidSyntax) {\
+ try {\
+ eval(sInvalidSyntax);\
+ } catch(e) {\
+ actual = TEST_PASSED;\
+ }\
+}\
+function checkThis(sAllowedSyntax) {}\
+reportCompare(expectedvalues[i], actualvalues[i], statusitems[i]);\
+exitFunc ('test');\
+");
+lfcode.push("gczeal(4);");
+lfcode.push("\
+var MSG_PATTERN = '\\nregexp = ';\
+var MSG_STRING = '\\nstring = ';\
+var MSG_EXPECT = '\\nExpect: ';\
+var MSG_ACTUAL = '\\nActual: ';\
+var TYPE_STRING = typeof 'abc';\
+function testRegExp(statuses, patterns, strings, actualmatches, expectedmatches)\
+ lExpect = expectedmatch.length;\
+ lActual = actualmatch.length;\
+ var expected = formatArray(expectedmatch);\
+ reportCompare(expected, actual, state + ERR_MATCH + CHAR_NL );\
+function getState(status, pattern, string) {\
+ var delim = CHAR_COMMA + CHAR_SPACE;\
+");
+lfcode.push("\
+var gTestcases = new Array;\
+function TestCase(n, d, e, a) {}\
+function toPrinted(value) value=value.replace(/\\\\n/g, 'NL').replace(/[^\\x20-\\x7E]+/g, escapeString);\
+");
+lfcode.push("\
+var summary = 'Regression test for bug 385393';\
+var expect = 'No Crash';\
+ reportCompare(expect, actual, summary);\
+");
+while (true) {
+ var file = lfcode.shift(); if (file == undefined) { break; }
+ loadFile(file);
+}
+function loadFile(lfVarx) {
+ try {
+ if (lfVarx.substr(-3) == ".js") {
+ switch (lfRunTypeId) { }
+ } else {
+ evaluate(lfVarx);
+ }
+ } catch (lfVare) { }
+}