diff options
| author | Alyssa Ross | 2016-09-30 19:34:14 +0100 |
|---|---|---|
| committer | Alyssa Ross | 2016-10-25 22:34:35 +0100 |
| commit | ef13f8eacaa62be6d2e4ee0af5041a6563fd0c71 (patch) | |
| tree | 916a19234345c2640a653fb730e1fb791fecd354 /Library/Homebrew/test | |
| parent | 452691528d4c5c67175963ddb33f5cc3d51dce41 (diff) | |
| download | brew-ef13f8eacaa62be6d2e4ee0af5041a6563fd0c71.tar.bz2 | |
uninstall: only <=1 Diagnostic.missing_deps call
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_uninstall.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_uninstall.rb b/Library/Homebrew/test/test_uninstall.rb index ede1e321b..c36a14477 100644 --- a/Library/Homebrew/test/test_uninstall.rb +++ b/Library/Homebrew/test/test_uninstall.rb @@ -43,6 +43,24 @@ class IntegrationCommandTestUninstall < IntegrationCommandTestCase end end + def test_uninstall_leaving_dependents_no_runtime_dependencies_in_tab + cmd("install", "testball_f2") + + f2_keg = f2.installed_kegs.first + f2_tab = Tab.for_keg(f2_keg) + f2_tab.runtime_dependencies = nil + f2_tab.write + + run_as_not_developer do + assert_match "Refusing to uninstall", + cmd_fail("uninstall", "testball_f1") + refute_empty f1.installed_kegs + assert_match "Uninstalling #{f2.rack}", + cmd("uninstall", "testball_f2") + assert_empty f2.installed_kegs + end + end + def test_uninstall_force_leaving_dependents cmd("install", "testball_f2") run_as_not_developer do |
