mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Update web-platform-tests to revision b'ee6da9d71d0268d7fdb04e8e5b26858f46ee0cc4'
This commit is contained in:
parent
4401622eb1
commit
b77ad115f6
16832 changed files with 270819 additions and 87621 deletions
|
@ -1,7 +1,14 @@
|
|||
test(() => {
|
||||
// Truncated sequences
|
||||
assert_equals(new TextDecoder().decode(new Uint8Array([0xF0])), "\uFFFD");
|
||||
assert_equals(new TextDecoder().decode(new Uint8Array([0xF0, 0x9F])), "\uFFFD");
|
||||
assert_equals(new TextDecoder().decode(new Uint8Array([0xF0, 0x9F, 0x92])), "\uFFFD");
|
||||
|
||||
// Errors near end-of-queue
|
||||
assert_equals(new TextDecoder().decode(new Uint8Array([0xF0, 0x9F, 0x41])), "\uFFFDA");
|
||||
assert_equals(new TextDecoder().decode(new Uint8Array([0xF0, 0x41, 0x42])), "\uFFFDAB");
|
||||
assert_equals(new TextDecoder().decode(new Uint8Array([0xF0, 0x41, 0xF0])), "\uFFFDA\uFFFD");
|
||||
assert_equals(new TextDecoder().decode(new Uint8Array([0xF0, 0x8F, 0x92])), "\uFFFD\uFFFD\uFFFD");
|
||||
}, "TextDecoder end-of-queue handling");
|
||||
|
||||
test(() => {
|
||||
|
@ -15,4 +22,19 @@ test(() => {
|
|||
|
||||
decoder.decode(new Uint8Array([0xF0, 0x9F]), { stream: true });
|
||||
assert_equals(decoder.decode(new Uint8Array([0x92])), "\uFFFD");
|
||||
|
||||
assert_equals(decoder.decode(new Uint8Array([0xF0, 0x9F]), { stream: true }), "");
|
||||
assert_equals(decoder.decode(new Uint8Array([0x41]), { stream: true }), "\uFFFDA");
|
||||
assert_equals(decoder.decode(), "");
|
||||
|
||||
assert_equals(decoder.decode(new Uint8Array([0xF0, 0x41, 0x42]), { stream: true }), "\uFFFDAB");
|
||||
assert_equals(decoder.decode(), "");
|
||||
|
||||
assert_equals(decoder.decode(new Uint8Array([0xF0, 0x41, 0xF0]), { stream: true }), "\uFFFDA");
|
||||
assert_equals(decoder.decode(), "\uFFFD");
|
||||
|
||||
assert_equals(decoder.decode(new Uint8Array([0xF0]), { stream: true }), "");
|
||||
assert_equals(decoder.decode(new Uint8Array([0x8F]), { stream: true }), "\uFFFD\uFFFD");
|
||||
assert_equals(decoder.decode(new Uint8Array([0x92]), { stream: true }), "\uFFFD");
|
||||
assert_equals(decoder.decode(), "");
|
||||
}, "TextDecoder end-of-queue handling using stream: true");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue