mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-26 19:51:11 +08:00
fix: match/search 走 GetMethod 派发,flags 归序与 normalize 校验
This commit is contained in:
@@ -702,8 +702,8 @@ fn symbol_entries_accept_plain_object_this() {
|
||||
"(() => { var o = { exec: function() { return { index: 2 }; } }; return RegExp.prototype[Symbol.search].call(o, 'abcd'); })()",
|
||||
)
|
||||
.unwrap();
|
||||
// ToNumber 结果为浮点形态(2.0)。
|
||||
assert_eq!(result.as_double(), 2.0);
|
||||
// 匹配位置为整数形态(与无匹配臂的 -1 同口径)。
|
||||
assert_eq!(result.as_int(), 2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user