From ca3952c50099581293c31de2a6a9ca9a2bf96e4a Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Wed, 16 Dec 2015 20:57:31 +0000 Subject: Add some more integration command tests. Add them for `install`, `bottle`, `uninstall`, `cleanup`. Closes Homebrew/homebrew#47079. Signed-off-by: Mike McQuaid --- Library/Homebrew/test/test_integration_cmds.rb | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'Library') 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 -- cgit v1.2.3