aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorVlad Shablinsky2015-03-12 21:00:32 +0300
committerMike McQuaid2015-03-12 21:03:58 +0000
commitddc993bc7ec3316b6985e056d994c31fa77ad232 (patch)
treec1c56f0c04c8731dfb75c457360182dc7bac6343 /Library/Formula
parentb0324fcfc77c9ef5b530e9165fd48aa1f430b091 (diff)
downloadhomebrew-ddc993bc7ec3316b6985e056d994c31fa77ad232.tar.bz2
yaml-cpp: add test do
Closes #37652. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/yaml-cpp.rb13
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