mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 08:46:19 -04:00
Added tests + fixes for PR
- actually removed prev func - shuffled some stuff around
This commit is contained in:
parent
9161cc693d
commit
6698a2ac13
4 changed files with 49 additions and 9 deletions
|
@ -232,4 +232,48 @@ TestRegister.addTests([
|
|||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Escape String: quotes",
|
||||
input: "Hello \"World\"! Escape 'these' quotes.",
|
||||
expectedOutput: "Hello \\\"World\\\"! Escape \\'these\\' quotes.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Escape String",
|
||||
"args": []
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Escape String: special characters",
|
||||
input: "Fizz & buzz\n\ttabbed newline\rcarriage returned line\nbackspace character: \"\" form feed character: \"\"",
|
||||
expectedOutput: "Fizz & buzz\\n\\ttabbed newline\\rcarriage returned line\\nbackspace character: \\\"\\b\\\" form feed character: \\\"\\f\\\"",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Escape String",
|
||||
"args": []
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Unescape String: quotes",
|
||||
input: "Hello \\\"World\\\"! Escape \\'these\\' quotes.",
|
||||
expectedOutput: "Hello \"World\"! Escape 'these' quotes.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Unescape String",
|
||||
"args": []
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Unescape String: special characters",
|
||||
input: "Fizz \x26 buzz\\n\\ttabbed newline\\rcarriage returned line\\nbackspace character: \\\"\\b\\\" form feed character: \\\"\\f\\\"",
|
||||
expectedOutput: "Fizz & buzz\n\ttabbed newline\rcarriage returned line\nbackspace character: \"\" form feed character: \"\"",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Unescape String",
|
||||
"args": []
|
||||
}
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue