1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 13:54:58 +00:00
serenity/Tests/LibWeb/Text/input/Encoding/TextDecoder-decode.html
2023-10-29 21:44:53 +01:00

12 lines
374 B
HTML

<script src="../include.js"></script>
<script>
test(() => {
try {
let decoder = new TextDecoder("utf-8");
println(`[${decoder.decode(new Uint8Array([0x41, 0x42, 0x43]))}]`); // "ABC"
println(`[${decoder.decode()}]`);
} catch(e) {
println("ERROR: " + e.name + ": " + e.message);
}
});
</script>