test/ft_4_misc.rb in openwferu-0.9.16 vs test/ft_4_misc.rb in openwferu-0.9.17
- old
+ new
@@ -98,25 +98,46 @@
tracer << workitem.attributes.length.to_s
"""
end
def test_reval_4
- dotest Reval4, [ "hello\n1", "hello\n0" ]
+ dotest Reval4, [ "hello\n2", "hello\n1" ]
end
class Reval5 < OpenWFE::ProcessDefinition
sequence do
reval """
wi.customer_name = 'dubious'
'surf'
"""
- _print "${f:customer_name}"
_print "${f:__result__}"
+ _print "${f:customer_name}"
end
end
def test_reval_5
- dotest Reval5, "dubious\nsurf"
+ dotest Reval5, "surf\ndubious"
+ end
+
+ class Reval6 < OpenWFE::ProcessDefinition
+ sequence do
+ set :field => "f0", :value => "3 + 2 + 2"
+ set :field => "f1" do
+ reval :field_code => "f0"
+ end
+ _print "${f:f1}"
+
+ set :variable => "v0", :value => "5 - 5"
+ set :variable => "v1" do
+ reval :variable_code => "v0"
+ end
+ _print "${v1}"
+ end
+ end
+
+ def test_reval_6
+ #log_level_to_debug
+ dotest Reval6, "7\n0"
end
#
# DRU tests