Sha256: c951d1dd8f527591d95877ca8870328d55bde71a3f0ba490a06982385841c760

Contents?: true

Size: 1.19 KB

Versions: 9

Compression:

Stored size: 1.19 KB

Contents

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

require 'flowtestbase'
require 'openwfe/def'

include OpenWFE



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

    #def setup
    #end

    #def teardown
    #end


    #
    # Test 0
    #

    class TestDefined40a0 < ProcessDefinition
        sequence do

            defined :field => "nada"
            _print "${f:__result__}"

            set :field => "nada", :value => "stuff"

            defined :field => "nada"
            _print "${f:__result__}"
            defined :field_value => "nada"
            _print "${f:__result__}"

            defined :field_match => "^na.*"
            _print "${f:__result__}"
            defined :field_match => "^Na.*"
            _print "${f:__result__}"
            defined :field_match => "da$"
            _print "${f:__result__}"

            undefined :field_value => "nada"
            _print "${f:__result__}"
            undefined :field_value => "other"
            _print "${f:__result__}"
        end
    end

    def test_0
        dotest(
            TestDefined40a0, 
            """
false
true
true
true
false
true
false
true
            """.strip,
            true)
    end

end

Version data entries

9 entries across 9 versions & 1 rubygems

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