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

- old
+ new

@@ -32,11 +32,10 @@ end _print "done." end end - #def xxxx_0 def test_0 dotest( TestCase45a0, [ """ .0 - 1 @@ -63,11 +62,10 @@ end _print "done." end end - #def xxxx_1 def test_1 dotest( TestCase45a1, [ """ .0 - 1 @@ -99,12 +97,11 @@ end end # test 'parked' for now - def xxxx_2 - #def test_2 + def _test_2 dotest( TestCase45a2, """ .0 - 1 .1 - 2 @@ -124,18 +121,67 @@ end _print "done." end end - # test 'parked' for now - - #def xxxx_3 def test_3 + dotest TestCase45a3, "done." + end + + + # + # Test 4 + # + + class TestCase45a4 < ProcessDefinition + sequence do + concurrent_iterator :on => "a, b, c", :to_field => "f" do + _print "${f:f}" + end + set :var => "v", :value => "1, 2" + concurrent_iterator :on_variable_value => "v", :to_field => "f" do + _print "${f:f}" + end + concurrent_iterator :on_var_value => "v", :to_field => "f" do + _print "${f:f}" + end + concurrent_iterator :on_var => "v", :to_field => "f" do + _print "${f:f}" + end + _print "done." + end + end + + def test_4 + dotest( - TestCase45a3, - """ -done. - """.strip) + TestCase45a4, + %w{ a b c 1 2 1 2 1 2 }.join("\n") + "\ndone.") + end + + + # + # Test 5 + # + + class TestCase45a5 < ProcessDefinition + sequence do + set :f => "f0", :value => "1, 2" + concurrent_iterator :on_f => "f0", :to_field => "f" do + _print "${f:f}" + end + concurrent_iterator :on_f => :f0, :to_field => "f" do + _print "${f:f}" + end + _print "done." + end + end + + def test_5 + + dotest( + TestCase45a5, + %w{ 1 2 1 2 }.join("\n") + "\ndone.") end end