m234
m2342w ago

deno test output: tty ansi is not escaped

When im testing deno tty ansi codes (e.g. test if "\x1B[2F" is a string) they are not escaped when printing within terminal. + they are diff-colored so it's completely broken. This should be easy to fix. The test:
Deno.test({
name: "partial update small screen",
fn() {
assertEquals(
optimizedUpdate("hello", "xello\nworld", sizeSmallWidth),
"\x1B[2Fx\x1B[4C\nworld",
//'\x1b[0G\x1b[1C\x1b[1Fx\x1b[1C\nworld'
);
},
});
Deno.test({
name: "partial update small screen",
fn() {
assertEquals(
optimizedUpdate("hello", "xello\nworld", sizeSmallWidth),
"\x1B[2Fx\x1B[4C\nworld",
//'\x1b[0G\x1b[1C\x1b[1Fx\x1b[1C\nworld'
);
},
});
No description
2 Replies
marvinh.
marvinh.2w ago
Can you file an issue for that https://github.com/denoland/deno/issues/ ?
GitHub
denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.
m234
m234OP2w ago
GitHub
deno test output: tty ansi is not escaped · Issue #30571 · denola...
Version: Deno 2.4.5 When im testing deno tty ansi codes (e.g. test if "\x1B[2F" is a string) they are not escaped when printing within terminal. The test: Deno.test({ name: "partial ...

Did you find this page helpful?