Author: akhaldi
Date: Sun Jun 5 19:26:27 2016
New Revision: 71558
URL:
http://svn.reactos.org/svn/reactos?rev=71558&view=rev
Log:
[JSCRIPT_WINETEST] Sync with Wine Staging 1.9.11. CORE-11368
Modified:
trunk/rostests/winetests/jscript/api.js
trunk/rostests/winetests/jscript/lang.js
trunk/rostests/winetests/jscript/regexp.js
Modified: trunk/rostests/winetests/jscript/api.js
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/api.js?…
==============================================================================
--- trunk/rostests/winetests/jscript/api.js [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/api.js [iso-8859-1] Sun Jun 5 19:26:27 2016
@@ -2098,6 +2098,8 @@
ok(Date.parse("Jan 20 2009 GMT") === 1232409600000, "Date.parse(\"Jan
20 2009 GMT\") = " + Date.parse("Jan 20 2009 GMT"));
ok(Date.parse("Jan 20 2009 UTC-0") === 1232409600000,
"Date.parse(\"Jan 20 2009 UTC-0\") = " + Date.parse("Jan 20 2009
UTC-0"));
ok(Date.parse("Jan 20 2009 UTC+0000") === 1232409600000,
"Date.parse(\"Jan 20 2009 UTC+0000\") = " + Date.parse("Jan 20
2009 UTC+0000"));
+ok(Date.parse("Jan 20 2009 UTC-1") === 1232413200000,
"Date.parse(\"Jan 20 2009 UTC-1\") = " + Date.parse("Jan 20 2009
UTC-1"));
+ok(Date.parse("Jan 20 2009 UTC+1") === 1232406000000,
"Date.parse(\"Jan 20 2009 UTC+1\") = " + Date.parse("Jan 20 2009
UTC+1"));
ok(Date.parse("Ju 13 79 UTC") === 300672000000, "Date.parse(\"Ju 13
79 UTC\") = " + Date.parse("Ju 13 79 UTC"));
ok(Date.parse("12Au91 UTC") === 681955200000, "Date.parse(\"12Au91
UTC\") = " + Date.parse("12Au91 UTC"));
ok(Date.parse("7/02/17 UTC") === -1656806400000,
"Date.parse(\"7/02/17 UTC\") = " + Date.parse("7/02/17
UTC"));
@@ -2108,6 +2110,10 @@
ok(Date.parse("23/71/2000 11::32::UTC") === 1010662320000,
"Date.parse(\"23/71/2000 11::32::UTC\") = " +
Date.parse("23/71/2000 11::32::UTC"));
ok(Date.parse("1970/01/01") === Date.parse("01/01/1970"),
"Date.parse(\"1970/01/01\") = " +
Date.parse("1970/01/01"));
ok(Date.parse("71/12/14") === Date.parse("12/14/1971"),
"Date.parse(\"71/12/14\") = " + Date.parse("71/12/14"));
+ok(Date.parse("Tue, 22 Mar 2016 09:57:55 -0300") === Date.parse("Tue, 22
Mar 2016 09:57:55 GMT-0300"),
+ "Date.parse(\"Tue, 22 Mar 2016 09:57:55 -0300\") = " +
Date.parse("Tue, 22 Mar 2016 09:57:55 -0300"));
+ok(Date.parse("Tue, 22 Mar 2016 09:57:55 +0400") === Date.parse("Tue, 22
Mar 2016 09:57:55 UTC+0400"),
+ "Date.parse(\"Tue, 22 Mar 2016 09:57:55 +0400\") = " +
Date.parse("Tue, 22 Mar 2016 09:57:55 +0400"));
ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " +
typeof(Math.PI));
ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);
Modified: trunk/rostests/winetests/jscript/lang.js
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/lang.js…
==============================================================================
--- trunk/rostests/winetests/jscript/lang.js [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/lang.js [iso-8859-1] Sun Jun 5 19:26:27 2016
@@ -194,6 +194,27 @@
testRecFunc(true);
ok(testRecFunc.arguments === null, "testRecFunc.arguments = " +
testRecFunc.arguments);
+function argumentsTest() {
+ var save = arguments;
+ with({arguments: 1}) {
+ ok(arguments === 1, "arguments = " + arguments);
+ (function() {
+ ok(argumentsTest.arguments === save, "unexpected
argumentsTest.arguments");
+ })();
+ }
+ eval('ok(arguments === save, "unexpected arguments");');
+ [1,2].sort(function() {
+ ok(argumentsTest.arguments === save, "unexpected
argumentsTest.arguments");
+ return 1;
+ });
+}
+
+argumentsTest();
+
+(function callAsExprTest() {
+ ok(callAsExprTest.arguments === null, "callAsExprTest.arguments = " +
callAsExprTest.arguments);
+})(1,2);
+
tmp = (function() {1;})();
ok(tmp === undefined, "tmp = " + tmp);
tmp = eval("1;");
@@ -214,6 +235,58 @@
tmp = (function(){ return testNoRes(), testRes();})();
+var f1, f2;
+
+ok(funcexpr() == 2, "funcexpr() = " + funcexpr());
+
+f1 = function funcexpr() { return 1; }
+ok(f1 != funcexpr, "f1 == funcexpr");
+ok(f1() === 1, "f1() = " + f1());
+
+f2 = function funcexpr() { return 2; }
+ok(f2 != funcexpr, "f2 != funcexpr");
+ok(f2() === 2, "f2() = " + f2());
+
+f1 = null;
+for(i = 0; i < 3; i++) {
+ f2 = function funcexpr2() {};
+ ok(f1 != f2, "f1 == f2");
+ f1 = f2;
+}
+
+f1 = null;
+for(i = 0; i < 3; i++) {
+ f2 = function() {};
+ ok(f1 != f2, "f1 == f2");
+ f1 = f2;
+}
+
+(function() {
+ ok(infuncexpr() == 2, "infuncexpr() = " + infuncexpr());
+
+ f1 = function infuncexpr() { return 1; }
+ ok(f1 != funcexpr, "f1 == funcexpr");
+ ok(f1() === 1, "f1() = " + f1());
+
+ f2 = function infuncexpr() { return 2; }
+ ok(f2 != funcexpr, "f2 != funcexpr");
+ ok(f2() === 2, "f2() = " + f2());
+
+ f1 = null;
+ for(i = 0; i < 3; i++) {
+ f2 = function infuncexpr2() {};
+ ok(f1 != f2, "f1 == f2");
+ f1 = f2;
+ }
+
+ f1 = null;
+ for(i = 0; i < 3; i++) {
+ f2 = function() {};
+ ok(f1 != f2, "f1 == f2");
+ f1 = f2;
+ }
+})();
+
var obj1 = new Object();
ok(typeof(obj1) === "object", "typeof(obj1) is not object");
ok(obj1.constructor === Object, "unexpected obj1.constructor");
@@ -388,6 +461,10 @@
/* ok(tmp === 8.75, "2.5*3.5 !== 8.75"); */
ok(tmp > 8.749999 && tmp < 8.750001, "2.5*3.5 !== 8.75");
ok(getVT(tmp) === "VT_R8", "getVT(2.5*3.5) !== VT_R8");
+
+tmp = 2*.5;
+ok(tmp === 1, "2*.5 !== 1");
+ok(getVT(tmp) == "VT_I4", "getVT(2*.5) !== VT_I4");
tmp = 4/2;
ok(tmp === 2, "4/2 !== 2");
Modified: trunk/rostests/winetests/jscript/regexp.js
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/regexp.…
==============================================================================
--- trunk/rostests/winetests/jscript/regexp.js [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/regexp.js [iso-8859-1] Sun Jun 5 19:26:27 2016
@@ -660,4 +660,21 @@
ok(tmp.toString() === "/abc//igm", "(new
RegExp(\"abc/\")).toString() = " + tmp.toString());
ok(/abc/.toString(1, false, "3") === "/abc/", "/abc/.toString(1,
false, \"3\") = " + /abc/.toString());
+re = /x/;
+ok(re.ignoreCase === false, "re.ignoreCase = " + re.ignoreCase);
+ok(re.multiline === false, "re.multiline = " + re.multiline);
+ok(re.global === false, "re.global = " + re.global);
+re = /x/i;
+ok(re.ignoreCase === true, "re.ignoreCase = " + re.ignoreCase);
+ok(re.multiline === false, "re.multiline = " + re.multiline);
+ok(re.global === false, "re.global = " + re.global);
+re = new RegExp("xxx", "gi");
+ok(re.ignoreCase === true, "re.ignoreCase = " + re.ignoreCase);
+ok(re.multiline === false, "re.multiline = " + re.multiline);
+ok(re.global === true, "re.global = " + re.global);
+re = /x/mg;
+ok(re.ignoreCase === false, "re.ignoreCase = " + re.ignoreCase);
+ok(re.multiline === true, "re.multiline = " + re.multiline);
+ok(re.global === true, "re.global = " + re.global);
+
reportSuccess();