Skip to content

Commit

Permalink
test_integration_cmds: compile in install test. (#479)
Browse files Browse the repository at this point in the history
Most of our formulae do compilation so let's do it here too.
  • Loading branch information
MikeMcQuaid authored Jul 11, 2016
1 parent 88793ba commit ac229f9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Library/Homebrew/test/test_integration_cmds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ def setup_test_formula(name, content = nil)
def install
(prefix/"foo"/"test").write("test") if build.with? "foo"
prefix.install Dir["*"]
(buildpath/"test.c").write \
"#include <stdio.h>\\nint main(){return printf(\\"test\\");}"
bin.mkpath
system ENV.cc, "test.c", "-o", bin/"test"
end
# something here
Expand Down Expand Up @@ -230,10 +234,9 @@ def test_config
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
Expand Down

0 comments on commit ac229f9

Please sign in to comment.