kiko
unread,Nov 14, 2009, 12:09:13 PM11/14/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ruote
hi again sorry about the print question, stayed up too late and
confused myself, thanks for testcase feedback, now getting more
comfortable with the code.
This issue I actually repeat in a test case.
Below I added a line
echo 'e', :if => '${f:e} is set'
which shouldn't echo anything cause the e field has not been set, the
test case fails now. Wondering if I'm doing something wrong.
<code>
#
# Testing Ruote (OpenWFEru)
#
# Fri Jul 3 19:46:22 JST 2009
#
require File.join(File.dirname(__FILE__), 'base')
class FtConditionalTest < Test::Unit::TestCase
include FunctionalBase
def test_string_equality
pdef = Ruote.process_definition :name => 'test' do
set :f => 'd', :val => '2'
sequence do
echo '${f:d}'
echo 'a', :if => '${f:d}'
echo 'b', :if => '${f:d} == 2'
echo 'c', :if => "${f:d} == '2'"
echo 'd', :if => '${f:d} is set'
echo 'e', :if => '${f:e} is set'
end
end
assert_trace(pdef, %w[ 2 a b d ])
end
def test_string_equality_when_space
pdef = Ruote.process_definition :name => 'test' do
set :f => 'd', :val => 'some dude'
sequence do
echo '${f:d}'
echo 'a', :if => '${f:d}'
echo 'b', :if => '${f:d} == some dude'
echo 'c', :if => "${f:d} == 'some dude'"
echo 'd', :if => '${f:d} is set'
end
end
assert_trace(pdef, "some dude\na\nb\nd")
end
end
</code>