public
Description: the [OpenWFEru] workflow and BPM engine (ruby)
Homepage: http://openwferu.rubyforge.org
Clone URL: git://github.com/jmettraux/ruote.git
ruote / test / ft_86_dollar_fv.rb
100644 69 lines (46 sloc) 1.07 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# Testing OpenWFE
#
# John Mettraux at openwfe.org
#
# Mon May 5 09:28:28 JST 2008
#
 
require 'rubygems'
 
require 'flowtestbase'
 
require 'openwfe/def'
 
 
class DollarFvTest < Test::Unit::TestCase
    include FlowTestBase
 
    #def setup
    #end
 
    #def teardown
    #end
 
    #
    # TEST 0
 
    class Test0 < OpenWFE::ProcessDefinition
 
        set_fields :value => {
            "a" => "f:a",
            "b" => "f:b",
        }
 
        sequence do
 
            set :var => "a", :val => "v:a"
            set :var => "c", :val => "v:c"
 
            _print "${f:a}"
            _print "${v:a}"
 
            _print "${field:a}"
            _print "${variable:a}"
 
            _print "${vf:a}"
            _print "${fv:a}"
 
            _print "${vf:b}"
            _print "${fv:b}"
            _print "${vf:c}"
            _print "${fv:c}"
 
            _print "${r:1+2}"
            _print "${ru:4+3}"
        end
    end
 
    def test_0
 
        dotest(
            Test0,
            %w{ f:a v:a f:a v:a v:a f:a f:b f:b v:c v:c 3 7 }.join("\n"))
    end
 
 
end