diff options
| author | Desmond Brand | 2013-04-27 15:21:17 -0700 | 
|---|---|---|
| committer | Misty De Meo | 2013-05-09 09:21:34 -0500 | 
| commit | fc565bee2603a2aaf3eaa79cdbc0e0ef85276ca6 (patch) | |
| tree | 36465e738c70bdc787039f7a7e27fcc1011c2f60 /Library/Homebrew/test | |
| parent | 1bc3574fcc3b3c1d6a9aaf9cac66b67a51eac97a (diff) | |
| download | homebrew-fc565bee2603a2aaf3eaa79cdbc0e0ef85276ca6.tar.bz2 | |
Overwrite broken symlinks with --overwrite
Closes #19480.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_keg.rb | 9 | 
1 files changed, 9 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_keg.rb b/Library/Homebrew/test/test_keg.rb index 3081381aa..208d62683 100644 --- a/Library/Homebrew/test/test_keg.rb +++ b/Library/Homebrew/test/test_keg.rb @@ -61,6 +61,15 @@ class LinkTests < Test::Unit::TestCase      assert_equal 3, @keg.link(mode)    end +  def test_link_overwrite_broken_symlinks +    FileUtils.cd HOMEBREW_PREFIX/"bin" do +      FileUtils.ln_s "nowhere", "helloworld" +    end +    mode = OpenStruct.new +    mode.overwrite = true +    assert_equal 3, @keg.link(mode) +  end +    def test_link_overwrite_dryrun      FileUtils.touch HOMEBREW_PREFIX/"bin/helloworld"      mode = OpenStruct.new  | 
