diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/yaml-cpp.rb | 13 |
1 files changed, 13 insertions, 0 deletions
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 <yaml-cpp/yaml.h> + 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 |
