Browse Source

Added Fork and Conditional Jump test

n1474335 8 years ago
parent
commit
3ad4291258
1 changed files with 12 additions and 0 deletions
  1. 12 0
      test/tests/operations/FlowControl.js

+ 12 - 0
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+/="]}
+        ]
+    },
 ]);