test/Rantfile in rant-0.3.4 vs test/Rantfile in rant-0.3.6

- old
+ new

@@ -1,6 +1,10 @@ +gen Action do + puts "running action" if var[:act_verbose] +end + task :do_nothing file "auto.rf" do |t| open(t.name, "w") { |f| f << <<-EOF @@ -9,10 +13,40 @@ end EOF } end +file "version.t" do |t| + open(t.name, "w") { |f| f.puts "1.0" } +end + +gen Action do + rac.build "version.t" +end + source "auto.rf" task :clean do - sys.rm_f %w(auto.t auto.rf) + sys.rm_f %w(auto.t auto.rf version.t) end + +gen Directory, "tmp.t" +task "tmp.t/Rantfile" => "tmp.t" do |t| + open(t.name, "w") { |f| + f << <<-EOF + file "test.t" do |t| sys.touch t.name end + EOF + } +end + +task :subdir_tmp do + subdirs %w(tmp.t) +end + +task :build_test_t do |t| + rac.build "tmp.t/test.t" + # just ensure we're NOT in the tmp.t directory + #STDERR.puts Dir.pwd + test(?d, "tmp.t") or t.fail +end + +# vim: ft=ruby