test/ft_14_subprocess.rb in ruote-0.9.18 vs test/ft_14_subprocess.rb in ruote-0.9.19
- old
+ new
@@ -9,80 +9,80 @@
require 'flowtestbase'
class FlowTest14 < Test::Unit::TestCase
- include FlowTestBase
+ include FlowTestBase
- #def setup
- #end
+ #def setup
+ #end
- #def teardown
- #end
+ #def teardown
+ #end
- def test_0
- dotest(
+ def test_0
+ dotest(
'''<process-definition name="subtest0" revision="0">
- <subprocess ref="sub0" />
+ <subprocess ref="sub0" />
- <process-definition name="sub0">
- <print>ok</print>
- </process-definition>
+ <process-definition name="sub0">
+ <print>ok</print>
+ </process-definition>
</process-definition>''', 'ok')
- end
+ end
- def test_1
- dotest(
+ def test_1
+ dotest(
'''<process-definition name="subtest0" revision="0">
- <sequence>
- <subprocess ref="sub0" />
- <subprocess ref="sub0" />
- </sequence>
+ <sequence>
+ <subprocess ref="sub0" />
+ <subprocess ref="sub0" />
+ </sequence>
- <process-definition name="sub0">
- <print>ok</print>
- </process-definition>
+ <process-definition name="sub0">
+ <print>ok</print>
+ </process-definition>
</process-definition>''', "ok\nok")
- end
+ end
- def test_2
- dotest(
+ def test_2
+ dotest(
'''<process-definition name="subtest0" revision="0">
- <sequence>
- <sub0 />
- <print>after</print>
- </sequence>
+ <sequence>
+ <sub0 />
+ <print>after</print>
+ </sequence>
- <process-definition name="sub0">
- <print>ok</print>
- </process-definition>
+ <process-definition name="sub0">
+ <print>ok</print>
+ </process-definition>
</process-definition>''', "ok\nafter")
- end
+ end
- def test_3
- dotest(
+ def test_3
+ dotest(
'''<process-definition name="subtest0" revision="0">
+ <sequence>
+ <set variable="v" value="out" />
+ <sub0 />
+ <print>after : ${v}</print>
+ </sequence>
+
+ <process-definition name="sub0">
<sequence>
- <set variable="v" value="out" />
- <sub0 />
- <print>after : ${v}</print>
+ <set variable="v" value="in" />
+ <print>ok : ${v}</print>
</sequence>
+ </process-definition>
- <process-definition name="sub0">
- <sequence>
- <set variable="v" value="in" />
- <print>ok : ${v}</print>
- </sequence>
- </process-definition>
-
</process-definition>''', "ok : in\nafter : out")
- end
+ end
end