aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_keg.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_keg.rb b/Library/Homebrew/test/test_keg.rb
index 9f4cc11fb..0fb419f0d 100644
--- a/Library/Homebrew/test/test_keg.rb
+++ b/Library/Homebrew/test/test_keg.rb
@@ -239,4 +239,20 @@ class LinkTests < Homebrew::TestCase
a.uninstall
b.uninstall
end
+
+ def test_removes_broken_symlinks_that_conflict_with_directories
+ a = HOMEBREW_CELLAR.join("a", "1.0")
+ a.join("lib", "foo").mkpath
+
+ keg = Keg.new(a)
+
+ link = HOMEBREW_PREFIX.join("lib", "foo")
+ link.parent.mkpath
+ link.make_symlink(@nonexistent)
+
+ keg.link
+ ensure
+ keg.unlink
+ keg.uninstall
+ end
end