test/ft_9_cursor.rb in openwferu-0.9.8 vs test/ft_9_cursor.rb in openwferu-0.9.9

- old
+ new

@@ -5,10 +5,11 @@ # John Mettraux at openwfe.org # # Tue Jan 2 13:14:37 JST 2007 # +require 'openwfe/def' require 'flowtestbase' class FlowTest9 < Test::Unit::TestCase include FlowTestBase @@ -18,11 +19,11 @@ #def teardown #end def test_cursor_0 - dotest(\ + dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <cursor> <print>a</print> <print>b</print> </cursor> @@ -30,11 +31,11 @@ """a b""") end def test_cursor_1 - dotest(\ + dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <cursor> <print>a</print> <print>b</print> <cancel /> @@ -44,11 +45,11 @@ """a b""") end def test_cursor_2 - dotest(\ + dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <cursor> <print>a</print> <print>b</print> <skip step="2" /> @@ -61,11 +62,11 @@ def test_cursor_2b # # ZigZag test # - dotest(\ + dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <cursor> <print>a</print> <skip step="3" /> <print>b</print> @@ -78,11 +79,11 @@ b c""") end def test_cursor_3 - dotest(\ + dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <cursor> <print>a</print> <skip step="2" /> <print>b</print> @@ -92,11 +93,11 @@ """a c""") end def test_cursor_4 - dotest(\ + dotest( '<process-definition name="'+name_of_test+'''" revision="0"> <sequence> <cursor> <print>a</print> <set field="__cursor_command__" value="skip 2" /> @@ -107,9 +108,38 @@ </sequence> </process-definition>''', """a c d""") + end + + def test_cursor_5 + dotest( +'<process-definition name="'+name_of_test+'''" revision="0"> + <cursor> + <print>a</print> + <skip>2</skip> + <print>b</print> + <print>c</print> + </cursor> +</process-definition>''', +"""a +c""") + end + + class TestCursor6 < OpenWFE::ProcessDefinition + cursor do + _print "a" + skip "2" + _print "b" + _print "c" + skip 2 + _print "d" + end + end + + def test_cursor_6 + dotest(TestCursor6, "a\nc") end end