diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/vala.rb | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/Library/Formula/vala.rb b/Library/Formula/vala.rb index 7df75b1f3..6ef74c065 100644 --- a/Library/Formula/vala.rb +++ b/Library/Formula/vala.rb @@ -6,7 +6,6 @@ class Vala < Formula url "http://ftp.acc.umu.se/pub/gnome/sources/vala/0.24/vala-0.24.0.tar.xz" sha1 "33a71a21e12e80cf1f4e0aa3b6a6523ff38e92c8" - depends_on "pkg-config" => :build depends_on "gettext" depends_on "glib" @@ -19,6 +18,26 @@ class Vala < Formula end test do - system "#{bin}/valac", "--version" + test_string = "Hello Homebrew\n" + path = testpath/"hello.vala" + path.write <<-EOS + void main () { + print ("#{test_string}"); + } + EOS + valac_args = [# Build with debugging symbols. + "-g", + # Use Homebrew's default C compiler. + "--cc=#{ENV.cc}", + # Save generated C source code. + "--save-temps", + # Vala source code path. + "#{path}"] + system "#{bin}/valac", *valac_args + assert File.exist?(testpath/"hello.c") + + output = `#{testpath}/hello` + assert_equal test_string, output + assert_equal 0, $?.exitstatus end end |
