#
# Testing OpenWFEru
#
# John Mettraux at openwfe.org
#
# Mon Oct 9 22:19:44 JST 2006
#
require 'flowtestbase'
class FlowTest0 < FlowTestBase
#def setup
#end
#def teardown
#end
def test_print
dotest(\
'''
ok
''', "ok")
end
def test_participant
dotest(\
'''
''', "test-alpha")
end
def test_sequence
dotest(\
'''
a
b
''', '''a
b''')
end
def test_dollar_notation_0
dotest(\
'''
${x} ${v:x}
''', 'y y')
end
def test_dollar_notation_1
dotest(\
'''
${f:x} ${field:x}
''', 'y y')
end
def test_dollar_notation_2
dotest(\
'''
${f:x}X${field:x}
''', 'X')
end
def test_subprocess_ref_0
dotest(\
'''
ok
''', 'ok')
end
def test_subprocess_ref_1
dotest(\
'''
ok
''', '''ok
ok''')
end
def test_subprocess_ref_2
dotest(\
'''
after
ok
''', '''ok
after''')
end
def test_subprocess_ref_3
dotest(\
'''
after : ${v}
ok : ${v}
''', '''ok : in
after : out''')
end
def test_subprocess_ref_4
dotest(\
'''
${a}${b}${c}
''', '''ABC
ABC''')
end
end