mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-10 08:15:00 -04:00
Add Malbolge operation in new esoteric programming category
This commit is contained in:
parent
8148c1a8a8
commit
6913afed00
6 changed files with 147 additions and 0 deletions
|
@ -57,6 +57,7 @@ import "./tests/JWTSign";
|
|||
import "./tests/JWTVerify";
|
||||
import "./tests/MS";
|
||||
import "./tests/Magic";
|
||||
import "./tests/Malbolge";
|
||||
import "./tests/MorseCode";
|
||||
import "./tests/NetBIOS";
|
||||
import "./tests/OTP";
|
||||
|
|
44
tests/operations/tests/Malbolge.mjs
Normal file
44
tests/operations/tests/Malbolge.mjs
Normal file
|
@ -0,0 +1,44 @@
|
|||
/**
|
||||
* Malbolge tests.
|
||||
*
|
||||
* @author Karsten Silkenbäumer [github.com/kassi]
|
||||
* @copyright Karsten Silkenbäumer 2019
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
import TestRegister from "../TestRegister";
|
||||
|
||||
TestRegister.addTests([
|
||||
{
|
||||
name: "Malbolge: no program",
|
||||
input: "",
|
||||
expectedOutput: "",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Malbolge",
|
||||
args: [""],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Malbolge: simple program",
|
||||
input: "('&%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&%$#\"`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~| 4XzyTT43Qsqq(Lnmkj\"Fhg${z@>",
|
||||
expectedOutput: "Hello World!",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Malbolge",
|
||||
args: [""],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Malbolge: simple cat with infinite user input",
|
||||
input: "(=BA#9\"=<;:3y7x54-21q/p-,+*)\"!h%B0/.\n~P<\n<:(8&\n66#\"!~}|{zyxwvu\ngJ%",
|
||||
expectedOutput: "First line\nSecond Line\nError: Input required",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Malbolge",
|
||||
args: ["First line\nSecond Line\n"],
|
||||
},
|
||||
],
|
||||
},
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue