mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Added Bcrypt, Scrypt, BSON and string operations along with many new tests.
This commit is contained in:
parent
2f5b0533d8
commit
715ca1c292
28 changed files with 1290 additions and 84 deletions
43
test/tests/operations/StrUtils.js
Normal file → Executable file
43
test/tests/operations/StrUtils.js
Normal file → Executable file
|
@ -218,13 +218,24 @@ TestRegister.addTests([
|
|||
],
|
||||
},
|
||||
{
|
||||
name: "Escape String: quotes",
|
||||
input: "Hello \"World\"! Escape 'these' quotes.",
|
||||
expectedOutput: "Hello \\\"World\\\"! Escape \\'these\\' quotes.",
|
||||
name: "Escape String: single quotes",
|
||||
input: "Escape 'these' quotes.",
|
||||
expectedOutput: "Escape \\'these\\' quotes.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Escape string",
|
||||
"args": []
|
||||
"args": ["Special chars", "Single", false, true, false]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Escape String: double quotes",
|
||||
input: "Hello \"World\"!",
|
||||
expectedOutput: "Hello \\\"World\\\"!",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Escape string",
|
||||
"args": ["Special chars", "Double", false, true, false]
|
||||
}
|
||||
],
|
||||
},
|
||||
|
@ -235,7 +246,7 @@ TestRegister.addTests([
|
|||
recipeConfig: [
|
||||
{
|
||||
"op": "Escape string",
|
||||
"args": []
|
||||
"args": ["Special chars", "Double", false, true, false]
|
||||
}
|
||||
],
|
||||
},
|
||||
|
@ -261,4 +272,26 @@ TestRegister.addTests([
|
|||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Escape String: complex",
|
||||
input: "null\0backspace\btab\tnewline\nverticaltab\vformfeed\fcarriagereturn\rdoublequote\"singlequote'hex\xa9unicode\u2665codepoint\u{1D306}",
|
||||
expectedOutput: "null\\0backspace\\btab\\tnewline\\nverticaltab\\x0bformfeed\\fcarriagereturn\\rdoublequote\"singlequote\\'hex\\xa9unicode\\u2665codepoint\\u{1d306}",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Escape string",
|
||||
"args": ["Special chars", "Single", false, true, false]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Unescape String: complex",
|
||||
input: "null\\0backspace\\btab\\tnewline\\nverticaltab\\vformfeed\\fcarriagereturn\\rdoublequote\\\"singlequote\\'hex\\xa9unicode\\u2665codepoint\\u{1D306}",
|
||||
expectedOutput: "null\0backspace\btab\tnewline\nverticaltab\vformfeed\fcarriagereturn\rdoublequote\"singlequote'hex\xa9unicode\u2665codepoint\u{1D306}",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Unescape string",
|
||||
"args": []
|
||||
}
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue