Commit b4175eeb authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

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: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent ed552165
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment