aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMike McQuaid2016-03-07 15:11:00 +0000
committerXu Cheng2016-03-08 13:47:29 +0800
commit0578ba0f429708773489fdd8f9647c2712c7025c (patch)
tree55e43ad3dab2eb9d20d05f4abc804d71b3a53260 /Library/Homebrew/test
parent6f9f3faef3d566641b3fa18e887819da7889018a (diff)
downloadbrew-0578ba0f429708773489fdd8f9647c2712c7025c.tar.bz2
install_renamed: handle recursive installs.
Closes Homebrew/homebrew#49845. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_pathname.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_pathname.rb b/Library/Homebrew/test/test_pathname.rb
index d29a2bc1e..3dba4e64a 100644
--- a/Library/Homebrew/test/test_pathname.rb
+++ b/Library/Homebrew/test/test_pathname.rb
@@ -137,6 +137,16 @@ class PathnameTests < Homebrew::TestCase
assert_equal "a", File.read(@dst+@src.basename+@file.basename)
end
+ def test_install_renamed_directory_recursive
+ @dst.extend(InstallRenamed)
+ (@dst+@dir.basename).mkpath
+ (@dst+@dir.basename+"another_file").write "a"
+ @dir.mkpath
+ (@dir+"another_file").write "b"
+ @dst.install @dir
+ assert_equal "b", File.read(@dst+@dir.basename+"another_file.default")
+ end
+
def test_cp_path_sub_file
@file.write "a"
@file.cp_path_sub @src, @dst