From ddc993bc7ec3316b6985e056d994c31fa77ad232 Mon Sep 17 00:00:00 2001 From: Vlad Shablinsky Date: Thu, 12 Mar 2015 21:00:32 +0300 Subject: yaml-cpp: add test do Closes #37652. Signed-off-by: Mike McQuaid --- Library/Formula/yaml-cpp.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Library/Formula/yaml-cpp.rb') diff --git a/Library/Formula/yaml-cpp.rb b/Library/Formula/yaml-cpp.rb index 4a335de1c..15458cfd2 100644 --- a/Library/Formula/yaml-cpp.rb +++ b/Library/Formula/yaml-cpp.rb @@ -36,4 +36,17 @@ class YamlCpp < Formula system "cmake", ".", *args system "make", "install" end + + test do + (testpath/"test.cpp").write <<-EOS.undent + #include + int main() { + YAML::Node node = YAML::Load("[0, 0, 0]"); + node[0] = 1; + return 0; + } + EOS + system ENV.cxx, "test.cpp", "-L#{lib}", "-lyaml-cpp", "-o", "test" + system "./test" + end end -- cgit v1.2.3