From 3ad4291258b557bd68594ca723e38158217844c9 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Wed, 1 Mar 2017 21:13:20 +0000 Subject: [PATCH] Added Fork and Conditional Jump test --- test/tests/operations/FlowControl.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/tests/operations/FlowControl.js b/test/tests/operations/FlowControl.js index d06c4deb..d960e5b5 100644 --- a/test/tests/operations/FlowControl.js +++ b/test/tests/operations/FlowControl.js @@ -52,4 +52,16 @@ TestRegister.addTests([ }, ], }, + { + name: "Fork, Conditional Jump, Encodings", + input: "Some data with a 1 in it\nSome data with a 2 in it", + expectedOutput: "U29tZSBkYXRhIHdpdGggYSAxIGluIGl0\n53 6f 6d 65 20 64 61 74 61 20 77 69 74 68 20 61 20 32 20 69 6e 20 69 74\n", + recipeConfig: [ + {"op":"Fork", "args":["\\n", "\\n", false]}, + {"op":"Conditional Jump", "args":["1", "2", "10"]}, + {"op":"To Hex", "args":["Space"]}, + {"op":"Return", "args":[]}, + {"op":"To Base64", "args":["A-Za-z0-9+/="]} + ] + }, ]);