mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-14 19:27:05 -04:00
test(script): exercise invalid wide characters in BINARY writes
This commit is contained in:
1 parent
d88bfe9f7c
commit
64ffb404e3
1 file changed
+1
-1
@@ -770,7 +770,7 @@ fn binary_file_io_preserves_all_byte_values() {
|
||||
|
||||
let invalid = run_code(
|
||||
&mut s,
|
||||
&format!("var f = new File({}); f.encoding = 'BINARY'; f.open('w'); f.write('\\u0100'); f.close();", q(&dst)),
|
||||
&format!("var f = new File({}); f.encoding = 'BINARY'; f.open('w'); f.write(String.fromCharCode(0x100)); f.close();", q(&dst)),
|
||||
"invalid-binary.jsx",
|
||||
);
|
||||
assert!(invalid.error.is_some(), "code points above 255 must not be truncated");
|
||||
|
||||
Reference in new issue
Block a user