mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 19:21:11 +08:00
fix: fmt 收口与 clippy ptr_eq 收敛,padStart 测试期望对齐码元口径
This commit is contained in:
@@ -1111,8 +1111,9 @@ fn string_slice_astral_character_indices() {
|
||||
)
|
||||
.unwrap();
|
||||
assert!(r.as_bool());
|
||||
// padStart 按码元口径:😀 占 2 单元,距目标 3 仅差 1 单元,补 1 个 x。
|
||||
let s = eval(&mut vm, "'\\u{1F600}'.padStart(3, 'x')").unwrap();
|
||||
assert_eq!(to_str(&vm, s), "xx\u{1F600}");
|
||||
assert_eq!(to_str(&vm, s), "x\u{1F600}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user