From 2c0f0d9a202f41e24be453d567834d472ec540b2 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Sun, 23 Apr 2017 18:29:54 +0100 Subject: [PATCH] Changed Head and Tail tests to match new 'AllBut' configuration. --- test/tests/operations/StrUtils.js | 64 ++++++++++--------------------- 1 file changed, 21 insertions(+), 43 deletions(-) diff --git a/test/tests/operations/StrUtils.js b/test/tests/operations/StrUtils.js index d1af9dd..1450d1b 100644 --- a/test/tests/operations/StrUtils.js +++ b/test/tests/operations/StrUtils.js @@ -41,7 +41,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 0, false] + "args": ["Line feed", 0] } ], }, @@ -52,7 +52,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 1, false] + "args": ["Line feed", 1] } ], }, @@ -63,7 +63,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 2, false] + "args": ["Line feed", 2] } ], }, @@ -74,7 +74,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 6, false] + "args": ["Line feed", 6] } ], }, @@ -85,18 +85,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 100, false] - } - ], - }, - { - name: "Head all but 0", - input: [1, 2, 3, 4, 5, 6].join("\n"), - expectedOutput: [1, 2, 3, 4, 5, 6].join("\n"), - recipeConfig: [ - { - "op": "Head", - "args": ["Line feed", 0, true] + "args": ["Line feed", 100] } ], }, @@ -107,7 +96,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 1, true] + "args": ["Line feed", -1] } ], }, @@ -118,7 +107,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 2, true] + "args": ["Line feed", -2] } ], }, @@ -129,7 +118,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 6, true] + "args": ["Line feed", -6] } ], }, @@ -140,7 +129,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Head", - "args": ["Line feed", 100, true] + "args": ["Line feed", -100] } ], }, @@ -151,7 +140,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 0, false] + "args": ["Line feed", 0] } ], }, @@ -162,7 +151,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 1, false] + "args": ["Line feed", 1] } ], }, @@ -173,7 +162,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 2, false] + "args": ["Line feed", 2] } ], }, @@ -184,7 +173,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 6, false] + "args": ["Line feed", 6] } ], }, @@ -195,51 +184,40 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 100, false] - } - ], - }, - { - name: "Tail all but 0", - input: [1, 2, 3, 4, 5, 6].join("\n"), - expectedOutput: [1, 2, 3, 4, 5, 6].join("\n"), - recipeConfig: [ - { - "op": "Tail", - "args": ["Line feed", 0, true] + "args": ["Line feed", 100] } ], }, { name: "Tail all but 1", input: [1, 2, 3, 4, 5, 6].join("\n"), - expectedOutput: [1, 2, 3, 4, 5, 6].join("\n"), + expectedOutput: [2, 3, 4, 5, 6].join("\n"), recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 1, true] + "args": ["Line feed", -1] } ], }, { name: "Tail all but 2", input: [1, 2, 3, 4, 5, 6].join("\n"), - expectedOutput: [2, 3, 4, 5, 6].join("\n"), + expectedOutput: [3, 4, 5, 6].join("\n"), recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 2, true] + "args": ["Line feed", -2] } ], }, { name: "Tail all but 6", input: [1, 2, 3, 4, 5, 6].join("\n"), - expectedOutput: [6].join("\n"), + expectedOutput: [].join("\n"), recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 6, true] + "args": ["Line feed", -6] } ], }, @@ -250,7 +228,7 @@ TestRegister.addTests([ recipeConfig: [ { "op": "Tail", - "args": ["Line feed", 100, true] + "args": ["Line feed", -100] } ], },