Sha256: 87dcd8e996d2ef4857ebdd43ec8e23a6d9bacb85fe6264bef1bae3e216dd4b2d

Contents?: true

Size: 1.59 KB

Versions: 2

Compression:

Stored size: 1.59 KB

Contents

#
# Testing OpenWFEru
#
# John Mettraux at openwfe.org
#
# Mon Oct  9 22:19:44 JST 2006
#

require 'flowtestbase'


class FlowTest3 < FlowTestBase

    #def setup
    #end

    #def teardown
    #end

    def test_equals_0
        dotest(\
'''<process-definition name="equals_0" revision="0">
    <sequence>
        <equals value="a" other-value="a" />
        <print>${field:__result__}</print>
    </sequence>
</process-definition>''', "true")
    end

    def test_equals_1
        dotest(\
'''<process-definition name="equals_1" revision="0">
    <sequence>
        <equals value="a" other-value="b" />
        <print>${field:__result__}</print>
    </sequence>
</process-definition>''', "false")
    end

    def test_if_0
        dotest(\
'''<process-definition name="if_0" revision="0">
    <if>
        <equals value="a" other-value="a" />
        <print>ok</print>
    </if>
</process-definition>''', "ok")
    end

    def test_if_1
        dotest(\
'''<process-definition name="if_1" revision="0">
    <if>
        <equals value="a" other-value="a" />
        <print>ok</print>
        <print>nok</print>
    </if>
</process-definition>''', "ok")
    end

    def test_if_2
        dotest(\
'''<process-definition name="if_2" revision="0">
    <if>
        <equals value="a" other-value="b" />
        <print>nok</print>
    </if>
</process-definition>''', "")
    end

    def test_if_3
        dotest(\
'''<process-definition name="if_3" revision="0">
    <if>
        <equals value="a" other-value="b" />
        <print>nok</print>
        <print>ok</print>
    </if>
</process-definition>''', "ok")
    end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
openwferu-0.9.0 test/ft_3_equals.rb
openwferu-0.9.1 test/ft_3_equals.rb