From 2c9e04bbb29e6abde4bd56cb20e278e6580e121b Mon Sep 17 00:00:00 2001 From: gggeek Date: Thu, 1 Nov 2018 16:46:29 +0000 Subject: [PATCH] add loop test --- Tests/dsl/good/UnitTestOK028_loops.yml | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Tests/dsl/good/UnitTestOK028_loops.yml b/Tests/dsl/good/UnitTestOK028_loops.yml index 2b8386af..b9119f51 100644 --- a/Tests/dsl/good/UnitTestOK028_loops.yml +++ b/Tests/dsl/good/UnitTestOK028_loops.yml @@ -24,3 +24,30 @@ identifier: reference:loopindex2 test: equals: "2.2" + +- + type: loop + over: { "hello": world, "buongiorno": mondo } + steps: + - + type: reference + mode: set + identifier: loopindex + value: "[loop:key] => [loop:value]" + overwrite: true + - + type: loop + repeat: 2 + steps: + - + type: reference + mode: set + identifier: loopindex2 + value: "[loop:iteration]. [reference:loopindex]" + overwrite: true +- + type: assert + target: reference + identifier: reference:loopindex2 + test: + equals: "2. buongiorno => mondo"