Gabriel Ivăncescu : mshtml/tests: Test for RegExp.prototype.toString with non-regexp.
Alexandre Julliard
julliard at winehq.org
Fri Mar 25 15:28:09 CDT 2022
Module: wine
Branch: master
Commit: b4175eebc0e9e21489f8c6b57e486f100bd394a2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=b4175eebc0e9e21489f8c6b57e486f100bd394a2
Author: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Date: Fri Mar 25 16:45:41 2022 +0200
mshtml/tests: Test for RegExp.prototype.toString with non-regexp.
According to the ES6 spec, it should work in generic way for objects exposing
"source" and "flags", but native IE seems to not follow it here and throws.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mshtml/tests/documentmode.js | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js
index b4d0bebfef0..3f772cf092f 100644
--- a/dlls/mshtml/tests/documentmode.js
+++ b/dlls/mshtml/tests/documentmode.js
@@ -1300,6 +1300,13 @@ sync_test("builtins_diffs", function() {
ok(e.number === (v < 9 ? 0xa01b6 : 0xa138f) - 0x80000000, "Object." + props[i] + " with non-object: exception = " + e.number);
}
}
+
+ try {
+ RegExp.prototype.toString.call({source: "foo", flags: "g"});
+ ok(false, "RegExp.toString with non-regexp: expected exception");
+ }catch(e) {
+ ok(e.number === 0xa1398 - 0x80000000, "RegExp.toString with non-regexp: exception = " + e.number);
+ }
});
sync_test("__proto__", function() {
More information about the wine-cvs
mailing list