diff options
| author | Mike McQuaid | 2015-12-16 20:57:31 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-12-18 09:14:16 +0000 |
| commit | ca3952c50099581293c31de2a6a9ca9a2bf96e4a (patch) | |
| tree | 5e529536af2bafd30e270a13a8c036d784f7439a | |
| parent | bab10696db85355ce2ebf271cbd1c004953070b4 (diff) | |
| download | brew-ca3952c50099581293c31de2a6a9ca9a2bf96e4a.tar.bz2 | |
Add some more integration command tests.
Add them for `install`, `bottle`, `uninstall`, `cleanup`.
Closes Homebrew/homebrew#47079.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
| -rw-r--r-- | Library/Homebrew/test/test_integration_cmds.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index d77d8deac..b9d26167e 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -79,4 +79,34 @@ class IntegrationCommandTests < Homebrew::TestCase assert_match HOMEBREW_REPOSITORY.to_s, cmd("--repository") end + + def test_install + assert_match "#{HOMEBREW_CELLAR}/testball/0.1", cmd("install", testball) + ensure + cmd("uninstall", "--force", testball) + cmd("cleanup", "--force", "--prune=all") + end + + def test_bottle + cmd("install", "--build-bottle", testball) + HOMEBREW_CACHE.cd do + assert_match(/testball-0\.1.*\.bottle\.tar\.gz/, + cmd_output("bottle", "--no-revision", testball)) + end + ensure + cmd("uninstall", "--force", testball) + cmd("cleanup", "--force", "--prune=all") + end + + def test_uninstall + cmd("install", "--build-bottle", testball) + assert_match "Uninstalling testball", cmd("uninstall", "--force", testball) + ensure + cmd("cleanup", "--force", "--prune=all") + end + + def test_cleanup + (HOMEBREW_CACHE/"test").write "test" + assert_match "#{HOMEBREW_CACHE}/test", cmd("cleanup", "--prune=all") + end end |
