Sha256: b9b159d880192d168c8d74f0d50d7f9c319c7357160a7b312319fdb10a4bb28a

Contents?: true

Size: 1.69 KB

Versions: 11

Compression:

Stored size: 1.69 KB

Contents

#
# Testing OpenWFEru
#
# John Mettraux at openwfe.org
#

require 'flowtestbase'
require 'openwfe/def'

include OpenWFE


class FlowTest43 < Test::Unit::TestCase
    include FlowTestBase

    #def setup
    #end

    #def teardown
    #end


    #
    # Test 0
    #

    class TestCase43a0 < ProcessDefinition
        def initialize (jump)
            super()
            @jump = jump
        end
        def make
            process_definition :name => "jump", :revision => "0" do
                sequence do
                    set :field => "__cursor_command__", :value => "jump #{@jump}"
                    cursor do
                        _print "0"
                        _print "1"
                        _print "2"
                    end
                    _print "3"
                end
            end
        end
    end

    #def xxxx_0
    def test_0
        dotest(
            TestCase43a0.new(1), 
            """
1
2
3
            """.strip)
    end

    #def xxxx_1
    def test_1
        dotest(
            TestCase43a0.new(2), 
            """
2
3
            """.strip)
    end

    #def xxxx_2
    def test_2
        dotest(
            TestCase43a0.new(2000), 
            """
2
3
            """.strip)
    end


    #
    # Test 3
    #

    class TestCase43a3 < ProcessDefinition
        sequence do
            set :field => "__cursor_command__", :value => "jump 2"
            cursor do
                _print "0"
                skip :step => 2
                jump :step => 0
                _print "1"
            end
            _print "2"
        end
    end

    #def xxxx_3
    def test_3
        dotest(
            TestCase43a3,
            """
0
1
2
            """.strip)
    end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
openwferu-0.9.10 test/ft_43_pat10.rb
openwferu-0.9.10.653 test/ft_43_pat10.rb
openwferu-0.9.11 test/ft_43_pat10.rb
openwferu-0.9.12 test/ft_43_pat10.rb
openwferu-0.9.12.863 test/ft_43_pat10.rb
openwferu-0.9.13 test/ft_43_pat10.rb
openwferu-0.9.14 test/ft_43_pat10.rb
openwferu-0.9.15 test/ft_43_pat10.rb
openwferu-0.9.16 test/ft_43_pat10.rb
openwferu-0.9.17 test/ft_43_pat10.rb
openwferu-0.9.9 test/ft_43_pat10.rb