From ac229f95b5097492ab2c81cfa2770abe2881615c Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 11 Jul 2016 09:20:00 +0100 Subject: [PATCH] test_integration_cmds: compile in install test. (#479) Most of our formulae do compilation so let's do it here too. --- Library/Homebrew/test/test_integration_cmds.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index 1c7da68181..5453504b08 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -123,6 +123,10 @@ class IntegrationCommandTests < Homebrew::TestCase def install (prefix/"foo"/"test").write("test") if build.with? "foo" prefix.install Dir["*"] + (buildpath/"test.c").write \ + "#include \\nint main(){return printf(\\"test\\");}" + bin.mkpath + system ENV.cc, "test.c", "-o", bin/"test" end # something here @@ -230,10 +234,9 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_install - assert_match "#{HOMEBREW_CELLAR}/testball/0.1", cmd("install", testball) - ensure - cmd("uninstall", "--force", testball) - cmd("cleanup", "--force", "--prune=all") + setup_test_formula "testball" + + assert_match "#{HOMEBREW_CELLAR}/testball/0.1", cmd("install", "testball") end def test_bottle