Skip to content

Commit

Permalink
making sure process root variables behave correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
jmettraux committed Sep 1, 2009
1 parent d0b2985 commit 4746b94
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,6 @@ restart tests :

[ ] jash : Time and DateTime and co ?

[ ] variables : process root
[ ] variables : transient engine level

24 changes: 24 additions & 0 deletions test/functional/ft_13_variables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ def test_wfid_and_expid
echo 'at:${wfid}:${expid}'
end

#noisy

wfid = @engine.launch(pdef)
wait_for(wfid)

Expand All @@ -42,5 +44,27 @@ def test_variables_event
assert_equal(
1, logger.log.select { |e| e[0] == :variables && e[1] == :unset }.size)
end

def test_process_root_variables

pdef = Ruote.process_definition do
sequence do
set 'v:va' => 'a0'
set 'v:/vb' => 'b0'
echo '${v:va}:${v:vb}:${v:/va}:${v:/vb}'
sub0
echo '${v:va}:${v:vb}:${v:/va}:${v:/vb}'
end
define 'sub0' do
set 'v:va' => 'a1'
set 'v:/vb' => 'b1'
echo '${v:va}:${v:vb}:${v:/va}:${v:/vb}'
end
end

#noisy

assert_trace(pdef, %w[ a0:b0:a0:b0 a1:b1:a0:b1 a0:b1:a0:b1 ])
end
end

0 comments on commit 4746b94

Please sign in to comment.