aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/test/test_keg.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_keg.rb b/Library/Homebrew/test/test_keg.rb
index ed92b7e7d..ff3627b7d 100644
--- a/Library/Homebrew/test/test_keg.rb
+++ b/Library/Homebrew/test/test_keg.rb
@@ -36,6 +36,18 @@ class LinkTests < Homebrew::TestCase
rmtree HOMEBREW_PREFIX/"lib"
end
+ def test_empty_installation
+ %w[.DS_Store INSTALL_RECEIPT.json LICENSE.txt].each do |file|
+ touch @keg/file
+ end
+ assert_predicate @keg, :exist?
+ assert_predicate @keg, :directory?
+ refute_predicate @keg, :empty_installation?
+
+ (@keg/"bin").rmtree
+ assert_predicate @keg, :empty_installation?
+ end
+
def test_linking_keg
assert_equal 3, @keg.link
(HOMEBREW_PREFIX/"bin").children.each { |c| assert_predicate c.readlink, :relative? }