mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 16:26:16 -04:00
ESM: Tidied up Set operations
This commit is contained in:
parent
955a082614
commit
e99331f305
12 changed files with 81 additions and 487 deletions
|
@ -12,18 +12,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "Cartesian Product",
|
||||
input: "1 2 3 4 5\n\na b c d e",
|
||||
expectedOutput: "(1,a) (2,b) (3,c) (4,d) (5,e)",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Cartesian Product",
|
||||
args: ["\n\n", " "],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Cartesian Product: wrong sample count",
|
||||
input: "1 2\n\n3 4 5\n\na b c d e",
|
||||
expectedOutput: "Incorrect number of sets, perhaps you need to modify the sample delimiter or add more samples?",
|
||||
expectedOutput: "(1,a) (1,b) (1,c) (1,d) (1,e) (2,a) (2,b) (2,c) (2,d) (2,e) (3,a) (3,b) (3,c) (3,d) (3,e) (4,a) (4,b) (4,c) (4,d) (4,e) (5,a) (5,b) (5,c) (5,d) (5,e)",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Cartesian Product",
|
||||
|
@ -34,7 +23,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "Cartesian Product: too many on left",
|
||||
input: "1 2 3 4 5 6\n\na b c d e",
|
||||
expectedOutput: "(1,a) (2,b) (3,c) (4,d) (5,e) (6,undefined)",
|
||||
expectedOutput: "(1,a) (1,b) (1,c) (1,d) (1,e) (2,a) (2,b) (2,c) (2,d) (2,e) (3,a) (3,b) (3,c) (3,d) (3,e) (4,a) (4,b) (4,c) (4,d) (4,e) (5,a) (5,b) (5,c) (5,d) (5,e) (6,a) (6,b) (6,c) (6,d) (6,e)",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Cartesian Product",
|
||||
|
@ -45,7 +34,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "Cartesian Product: too many on right",
|
||||
input: "1 2 3 4 5\n\na b c d e f",
|
||||
expectedOutput: "(1,a) (2,b) (3,c) (4,d) (5,e) (undefined,f)",
|
||||
expectedOutput: "(1,a) (1,b) (1,c) (1,d) (1,e) (1,f) (2,a) (2,b) (2,c) (2,d) (2,e) (2,f) (3,a) (3,b) (3,c) (3,d) (3,e) (3,f) (4,a) (4,b) (4,c) (4,d) (4,e) (4,f) (5,a) (5,b) (5,c) (5,d) (5,e) (5,f)",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Cartesian Product",
|
||||
|
@ -56,7 +45,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "Cartesian Product: item delimiter",
|
||||
input: "1-2-3-4-5\n\na-b-c-d-e",
|
||||
expectedOutput: "(1,a)-(2,b)-(3,c)-(4,d)-(5,e)",
|
||||
expectedOutput: "(1,a)-(1,b)-(1,c)-(1,d)-(1,e)-(2,a)-(2,b)-(2,c)-(2,d)-(2,e)-(3,a)-(3,b)-(3,c)-(3,d)-(3,e)-(4,a)-(4,b)-(4,c)-(4,d)-(4,e)-(5,a)-(5,b)-(5,c)-(5,d)-(5,e)",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Cartesian Product",
|
||||
|
@ -67,7 +56,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "Cartesian Product: sample delimiter",
|
||||
input: "1 2 3 4 5_a b c d e",
|
||||
expectedOutput: "(1,a) (2,b) (3,c) (4,d) (5,e)",
|
||||
expectedOutput: "(1,a) (1,b) (1,c) (1,d) (1,e) (2,a) (2,b) (2,c) (2,d) (2,e) (3,a) (3,b) (3,c) (3,d) (3,e) (4,a) (4,b) (4,c) (4,d) (4,e) (5,a) (5,b) (5,c) (5,d) (5,e)",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Cartesian Product",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue