From 3e9a88c365ebcfd9de9d1753af60c5b9f11ff05c Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 27 Mar 2014 09:59:54 -0500 Subject: [PATCH] Assert that the broken symlink is actually overwritten --- Library/Homebrew/test/test_keg.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/test/test_keg.rb b/Library/Homebrew/test/test_keg.rb index 6d1790ae11..a43249508d 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