aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_integration_cmds.rb
diff options
context:
space:
mode:
authorXu Cheng2015-12-19 21:24:45 +0800
committerXu Cheng2015-12-19 22:05:30 +0800
commitfe2bec5e8b99d77c8b1af5bcaae9f368d3eabced (patch)
tree8727df31d3e54a62443b86f277162ef91de8a7b9 /Library/Homebrew/test/test_integration_cmds.rb
parent6bb341dc24e31a88435cd102941ceed3ed66eff7 (diff)
downloadbrew-fe2bec5e8b99d77c8b1af5bcaae9f368d3eabced.tar.bz2
add IntergrationCommandTests#test_readall
Diffstat (limited to 'Library/Homebrew/test/test_integration_cmds.rb')
-rw-r--r--Library/Homebrew/test/test_integration_cmds.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb
index b9d26167e..859de9f6e 100644
--- a/Library/Homebrew/test/test_integration_cmds.rb
+++ b/Library/Homebrew/test/test_integration_cmds.rb
@@ -109,4 +109,22 @@ class IntegrationCommandTests < Homebrew::TestCase
(HOMEBREW_CACHE/"test").write "test"
assert_match "#{HOMEBREW_CACHE}/test", cmd("cleanup", "--prune=all")
end
+
+ def test_readall
+ repo = CoreFormulaRepository.new
+ formula_file = repo.formula_dir/"foo.rb"
+ formula_file.write <<-EOS.undent
+ class Foo < Formula
+ url "https://example.com/foo-1.0.tar.gz"
+ end
+ EOS
+ alias_file = repo.alias_dir/"bar"
+ alias_file.parent.mkpath
+ FileUtils.ln_s formula_file, alias_file
+ cmd("readall", "--aliases", "--syntax")
+ cmd("readall", "Homebrew/homebrew")
+ ensure
+ formula_file.unlink
+ repo.alias_dir.rmtree
+ end
end