diff options
| author | Alyssa Ross | 2016-09-03 21:10:44 +0100 |
|---|---|---|
| committer | Alyssa Ross | 2016-09-03 21:16:43 +0100 |
| commit | 0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79 (patch) | |
| tree | 15c68c1d02e144cb86c32bc870cf75cc6547d8e0 /Library/Homebrew/test/test_formula.rb | |
| parent | 9fd97dd3cf26b6644a9f808945869b2af44db26e (diff) | |
| download | brew-0ef3e1e0dcbcd5aa55408fe81d23613e1c2c5e79.tar.bz2 | |
Preserve alias when installing formulae
Part of #567
Diffstat (limited to 'Library/Homebrew/test/test_formula.rb')
| -rw-r--r-- | Library/Homebrew/test/test_formula.rb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Library/Homebrew/test/test_formula.rb b/Library/Homebrew/test/test_formula.rb index 7ebb17884..1ea1ff185 100644 --- a/Library/Homebrew/test/test_formula.rb +++ b/Library/Homebrew/test/test_formula.rb @@ -8,13 +8,30 @@ class FormulaTests < Homebrew::TestCase name = "formula_name" path = Formulary.core_path(name) spec = :stable + install_name = "formula_alias" - f = klass.new(name, path, spec) + f = klass.new(name, path, spec, install_name: install_name) assert_equal name, f.name assert_equal path, f.path + assert_equal install_name, f.install_name assert_raises(ArgumentError) { klass.new } end + def test_install_ref_with_alias + name = "formula_name" + path = Formulary.core_path(name) + spec = :stable + install_name = "formula_alias" + + f = Testball.new(name, path, spec, install_name: install_name) + assert_equal f.install_name, f.install_ref + end + + def test_install_ref_with_non_alias + f = Testball.new + assert_equal f.path, f.install_ref + end + def test_prefix f = Testball.new assert_equal HOMEBREW_CELLAR/f.name/"0.1", f.prefix |
