aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-27 09:59:54 -0500
committerJack Nagel2014-03-27 09:59:54 -0500
commit3e9a88c365ebcfd9de9d1753af60c5b9f11ff05c (patch)
treee80879a6376bc65e2b39bc61b492b80228c9d25c /Library
parente9ee6400242b6137a627f803897e50b403ea976d (diff)
downloadbrew-3e9a88c365ebcfd9de9d1753af60c5b9f11ff05c.tar.bz2
Assert that the broken symlink is actually overwritten
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_keg.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/test/test_keg.rb b/Library/Homebrew/test/test_keg.rb
index 6d1790ae1..a43249508 100644
--- a/Library/Homebrew/test/test_keg.rb
+++ b/Library/Homebrew/test/test_keg.rb
@@ -61,8 +61,11 @@ class LinkTests < Test::Unit::TestCase
end
def test_link_ignores_broken_symlinks_at_target
- ln_s "/some/nonexistent/path", HOMEBREW_PREFIX/"bin/helloworld"
+ dst = HOMEBREW_PREFIX/"bin/helloworld"
+ src = @keg/"bin/helloworld"
+ ln_s "/some/nonexistent/path", dst
shutup { @keg.link }
+ assert_equal src.relative_path_from(dst.dirname), dst.readlink
end
def test_link_overwrite