From fe2bec5e8b99d77c8b1af5bcaae9f368d3eabced Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 19 Dec 2015 21:24:45 +0800 Subject: [PATCH] add IntergrationCommandTests#test_readall --- Library/Homebrew/test/test_integration_cmds.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index b9d26167e7..859de9f6ef 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