test/ft_49_condition.rb in openwferu-0.9.10.653 vs test/ft_49_condition.rb in openwferu-0.9.11

- old
+ new

@@ -56,11 +56,69 @@ 2 true 3 true 4 true 5 6 - """.strip, - true) + """.strip) + end + + + # + # Test 1 + # + + class TestCondition49a1 < ProcessDefinition + sequence do + _if :test => "true and false and false" + _print "0 ${f:__result__}" + _if :rtest => "true and true and true" + _print "1 ${f:__result__}" + _if :rtest => "false or false or true" + _print "2 ${f:__result__}" + end + end + + #def xxxx_0 + def test_1 + + dotest( + TestCondition49a1, + """ +0 +1 true +2 true + """.strip) + end + + + # + # Test 2 + # + + class TestCondition49a2 < ProcessDefinition + sequence do + _if :test => "true" + _print "0 ${f:__result__}" + _if :not => "false" + _print "1 ${f:__result__}" + _if :rnot => "1 > 3" + _print "2 ${f:__result__}" + _if :rnot => "1 > -1" + _print "3 ${f:__result__}" + end + end + + #def xxxx_2 + def test_2 + + dotest( + TestCondition49a2, + """ +0 true +1 true +2 true +3 + """.strip) end end