Add a failing test for "javascript escaped" ansi escape codes

This commit is contained in:
GCHQDeveloper581 2026-03-04 10:34:33 +00:00
parent 3e10d20fbf
commit aae935d3ea
No known key found for this signature in database
GPG key ID: 6222E059A3DF595C

View file

@ -41,5 +41,27 @@ TestRegister.addTests([
],
},
],
}
},
{
"name": "Remove ANSI Escape Codes: text containing javascript escape representation of ansi escape codes",
// input/output expressed in hex to avoid accidental interpretation of Javascript escapes and to make the test case explicit
"input": "5c 30 33 33 5b 33 32 3b 31 3b 33 3b 34 3b 39 6d 48 65 6c 6c 6f 2c 20 5c 30 33 33 5b 33 32 3b 31 3b 33 3b 34 3b 39 6d 57 6f 72 6c 64 21",
"expectedOutput": "5c 30 33 33 5b 33 32 3b 31 3b 33 3b 34 3b 39 6d 48 65 6c 6c 6f 2c 20 5c 30 33 33 5b 33 32 3b 31 3b 33 3b 34 3b 39 6d 57 6f 72 6c 64 21",
"recipeConfig": [
{
"op": "From Hex",
"args": ["Auto"]
},
{
"op": "Remove ANSI Escape Codes",
"args": []
},
{
"op": "To Hex",
"args": ["Space", 0]
}
],
},
]);