test/ft_10_loop.rb in openwferu-0.9.16 vs test/ft_10_loop.rb in openwferu-0.9.17

- old
+ new

@@ -38,15 +38,13 @@ <break/> </if> </loop> </sequence> </process-definition>''', - $s, - true) + $s) end - #def xxxx_loop_1 def test_loop_1 dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <sequence> <reval>$i = 0</reval> @@ -57,15 +55,13 @@ <break/> </if> </loop> </sequence> </process-definition>''', - $s, - true) + $s) end - #def xxxx_loop_2 def test_loop_2 dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <sequence> <reval>$i = 0</reval> @@ -74,15 +70,13 @@ <reval>$i = $i + 1</reval> <break if="${r:$i} == 10" /> </loop> </sequence> </process-definition>''', - $s, - true) + $s) end - #def xxxx_loop_3 def test_loop_3 dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <sequence> <reval>$i = 0</reval> @@ -91,15 +85,13 @@ <reval>$i = $i + 1</reval> <break if="${r:$i == 10}" /> </loop> </sequence> </process-definition>''', - $s, - true) + $s) end - #def xxxx_loop_4 def test_loop_4 dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <sequence> <reval>$i = 0</reval> @@ -108,11 +100,34 @@ <reval>$i = $i + 1</reval> <break rif="$i == 10" /> </loop> </sequence> </process-definition>''', - $s, - true) + $s) + end + + def test_loop_5 + + #log_level_to_debug + + dotest( +'<process-definition name="'+name_of_test+'''" revision="0"> + <sequence> + <reval>$i = 0</reval> + <loop> + <!-- + <reval>$i = $i + 1</reval> + <set field="f" value="${r:$i}" /> + --> + <set field="f"> + <reval>$i = $i + 1</reval> + </set> + <print>${r:$i}</print> + <break if="${f:f}" /> + </loop> + </sequence> +</process-definition>''', + '1') end end