mirror of
https://github.com/gchq/CyberChef.git
synced 2026-01-30 20:30:32 -08:00
Add tests for remove ANSI escape codes operation
This commit is contained in:
parent
d1d451a79c
commit
53adbca9be
1 changed files with 39 additions and 0 deletions
|
|
@ -3,4 +3,43 @@
|
|||
* @copyright Crown Copyright 2025
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../../lib/TestRegister.mjs";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
"name": "Remove ANSI Escape Codes: x1b escape code",
|
||||
"input": "\\x1b[31;1;3;4;9mHello, \\x1b[31;1;3;4;9mWorld!",
|
||||
"expectedOutput": "Hello, World!",
|
||||
"recipeConfig": [
|
||||
{
|
||||
"op": "Remove ANSI Escape Codes",
|
||||
"args": [
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Remove ANSI Escape Codes: 033 escape code",
|
||||
"input": "\\033[32;1;3;4;9mHello, \\033[32;1;3;4;9mWorld!",
|
||||
"expectedOutput": "Hello, World!",
|
||||
"recipeConfig": [
|
||||
{
|
||||
"op": "Remove ANSI Escape Codes",
|
||||
"args": [
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Remove ANSI Escape Codes: e escape code",
|
||||
"input": "\\e[32;1;3;4;9mHello, \\e[32;1;3;4;9mWorld!",
|
||||
"expectedOutput": "Hello, World!",
|
||||
"recipeConfig": [
|
||||
{
|
||||
"op": "Remove ANSI Escape Codes",
|
||||
"args": [
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue