Files
scriptc/tests/corpus/116-text-decoder-runtime.js
Chris Tate e2d58f60d2 Expand static support for common Effect 4 patterns (#600)
* Expand static compilation for common Effect 4 patterns

* Run every Effect 4 fixture slice in CI

* Preserve existing corpus behavior across Effect 4 lowering

* Preserve Effect platform callbacks and native stream state

* Record new corpus baselines and retain child stdin refusals

* Retire the obsolete stateful regex diagnostic

* Preserve promise reference count layout for cycle collection
2026-10-01 17:36:29 -05:00

12 lines
321 B
JavaScript

function decode(label) {
return new TextDecoder(label).decode(new Uint8Array([0x68, 0x69]));
}
console.log(decode(), decode(" \tUTF-8\r\n"), decode("latin1"));
for (const label of ["bad", "", "utf-8\u00a0"]) {
try {
decode(label);
} catch (error) {
console.log(error.name, error.code, error.message);
}
}