cmdtest/t/00-ignore_file.rb
Johan Holmberg 2c61efb00d add tests
2009-03-24 08:43:47 +00:00

60 lines
966 B
Ruby

#======================================================================
# test ignore_file
#-----------------------------------
# ignore_file -- actually created
ignore_file "bbb"
cmd "touch.rb bbb" do
end
# stdout begin
# ### touch.rb bbb
# stdout end
#-----------------------------------
# ignore_file -- not created
ignore_file "aaa"
cmd "touch.rb bbb" do
end
# stdout begin
# ### touch.rb bbb
# --- ERROR: created files
# --- actual: ["bbb"]
# --- expect: []
# stdout end
#-----------------------------------
# ignore_file -- in subdir + ok
ignore_file "dir/bbb"
Dir.mkdir "dir"
cmd "touch.rb dir/bbb" do
end
# stdout begin
# ### touch.rb dir/bbb
# stdout end
#-----------------------------------
# ignore_file -- in subdir + error
ignore_file "bbb"
Dir.mkdir "dir"
cmd "touch.rb dir/bbb" do
end
# stdout begin
# ### touch.rb dir/bbb
# --- ERROR: created files
# --- actual: ["dir/bbb"]
# --- expect: []
# stdout end