From 3fb03ce229eb67aab01a390a7ac599130d20b5a4 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Wed, 31 Dec 2014 21:59:35 +0800 Subject: tinyxml: add test Closes #35397. Signed-off-by: Mike McQuaid --- Library/Formula/tinyxml.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Library/Formula/tinyxml.rb') diff --git a/Library/Formula/tinyxml.rb b/Library/Formula/tinyxml.rb index fb104d3c4..19f027332 100644 --- a/Library/Formula/tinyxml.rb +++ b/Library/Formula/tinyxml.rb @@ -48,4 +48,23 @@ class Tinyxml < Formula Cflags: -I${includedir} EOS end + + test do + (testpath/"test.xml").write <<-EOS.undent + + World + EOS + (testpath/"test.cpp").write <<-EOS.undent + #include + + int main() + { + TiXmlDocument doc ("test.xml"); + doc.LoadFile(); + return 0; + } + EOS + system ENV.cxx, "test.cpp", "-ltinyxml", "-o", "test" + system "./test" + end end -- cgit v1.2.3