diff options
| author | Xu Cheng | 2016-01-09 21:09:02 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-01-09 21:09:02 +0800 |
| commit | f6355c9dfc084dd95af263f4ecb13647e8f25a4f (patch) | |
| tree | b310276878ae3aa13ef1f1dfb201c562c6319044 /Library | |
| parent | 885022a5e3003e6beff467033983551089726141 (diff) | |
| download | brew-f6355c9dfc084dd95af263f4ecb13647e8f25a4f.tar.bz2 | |
test_keg: add test_empty_installation
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/test_keg.rb | 12 |
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? } |
