aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/libyaml.rb18
1 files changed, 16 insertions, 2 deletions
diff --git a/Library/Formula/libyaml.rb b/Library/Formula/libyaml.rb
index f14faf317..a89e278ce 100644
--- a/Library/Formula/libyaml.rb
+++ b/Library/Formula/libyaml.rb
@@ -1,5 +1,3 @@
-require "formula"
-
class Libyaml < Formula
homepage "http://pyyaml.org/wiki/LibYAML"
url "http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz"
@@ -22,4 +20,20 @@ class Libyaml < Formula
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install"
end
+
+ test do
+ (testpath/"test.c").write <<-EOS.undent
+ #include <yaml.h>
+
+ int main()
+ {
+ yaml_parser_t parser;
+ yaml_parser_initialize(&parser);
+ yaml_parser_delete(&parser);
+ return 0;
+ }
+ EOS
+ system ENV.cc, "test.c", "-lyaml", "-o", "test"
+ system "./test"
+ end
end