From 94aed6ece5517344760816e521ee5d62366dfafb Mon Sep 17 00:00:00 2001 From: "Satadru Pramanik, DO, MPH, MEng" Date: Thu, 9 Feb 2023 22:37:26 -0500 Subject: [ruby/fileutils] Add mkdir_p to FileUtils.install (https://github.com/ruby/fileutils/pull/104) * Add mkdir_p to FileUtils.install * Adjust raise message. * adjust raise language * handle trailing slash in dest * simplify * Add tests --- test/fileutils/test_fileutils.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/fileutils') diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index 3994da7433..481f913d0c 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -1237,6 +1237,14 @@ class TestFileUtils < Test::Unit::TestCase install Pathname.new('tmp/a'), 'tmp/b' rm_f 'tmp/a'; touch 'tmp/a' install Pathname.new('tmp/a'), Pathname.new('tmp/b') + my_rm_rf 'tmp/new_dir_end_with_slash' + install Pathname.new('tmp/a'), 'tmp/new_dir_end_with_slash/' + my_rm_rf 'tmp/new_dir_end_with_slash' + my_rm_rf 'tmp/new_dir' + install Pathname.new('tmp/a'), 'tmp/new_dir/a' + my_rm_rf 'tmp/new_dir' + install Pathname.new('tmp/a'), 'tmp/new_dir/new_dir_end_with_slash/' + my_rm_rf 'tmp/new_dir' rm_f 'tmp/a' touch 'tmp/a' touch 'tmp/b' -- cgit v1.2.1