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

34 lines
809 B
Ruby

#======================================================================
# test import_file
#-----------------------------------
# import_file -- different dirs
import_file "file1.txt", "qwerty1.txt"
import_file "file2.txt", "subdir/qwerty2.txt"
cmd "cat.rb qwerty1.txt subdir/qwerty2.txt > qwerty3.txt" do
created_files "qwerty3.txt"
end
# stdout begin
# ### cat.rb qwerty1.txt subdir/qwerty2.txt > qwerty3.txt
# stdout end
#-----------------------------------
# import_file -- after chdir
Dir.mkdir("dir")
Dir.chdir("dir")
import_file "file1.txt", "qwerty1.txt"
import_file "file2.txt", "subdir/qwerty2.txt"
cmd "cat.rb qwerty1.txt subdir/qwerty2.txt > qwerty3.txt" do
created_files "dir/qwerty3.txt"
end
# stdout begin
# ### cat.rb qwerty1.txt subdir/qwerty2.txt > qwerty3.txt
# stdout end