test/ft_49_condition.rb in openwferu-0.9.15 vs test/ft_49_condition.rb in openwferu-0.9.16

- old
+ new

@@ -36,30 +36,31 @@ _if :test => "print ''; true" _print "3 ${f:__result__}" _if :test => "begin print ''; end; true" _print "4 ${f:__result__}" + unset :field => "__result__" + _if :test => "true == " _print "5 ${f:__result__}" _if :test => " == true" _print "6 ${f:__result__}" end end - #def xxxx_0 def test_0 dotest( TestCondition49a0, """ -0 -1 +0 false +1 false 2 true 3 true 4 true -5 -6 +5 false +6 false """.strip) end # @@ -75,17 +76,16 @@ _if :rtest => "false or false or true" _print "2 ${f:__result__}" end end - #def xxxx_0 def test_1 dotest( TestCondition49a1, """ -0 +0 false 1 true 2 true """.strip) end @@ -100,29 +100,33 @@ _print "0 ${f:__result__}" _if :not => "false" _print "1 ${f:__result__}" _if :rnot => "1 > 3" _print "2 ${f:__result__}" + + unset :field => "__result__" + _if :rnot => "1 > -1" _print "3 ${f:__result__}" - _if :rtest => "workitem.attributes.size % 2 == 0" + + _if :rtest => "workitem.is_a?(String)" _print "4 ${f:__result__}" - _if :rtest => "wi.attributes.size % 2 == 1" + + _if :rtest => "wi.is_a?(InFlowWorkItem)" _print "5 ${f:__result__}" end end - #def xxxx_2 def test_2 dotest( TestCondition49a2, """ 0 true 1 true 2 true -3 -4 +3 false +4 false 5 true """.strip) end end