aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/tinyxml.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/tinyxml.rb')
-rw-r--r--Library/Formula/tinyxml.rb19
1 files changed, 19 insertions, 0 deletions
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
+ <?xml version="1.0" ?>
+ <Hello>World</Hello>
+ EOS
+ (testpath/"test.cpp").write <<-EOS.undent
+ #include <tinyxml.h>
+
+ int main()
+ {
+ TiXmlDocument doc ("test.xml");
+ doc.LoadFile();
+ return 0;
+ }
+ EOS
+ system ENV.cxx, "test.cpp", "-ltinyxml", "-o", "test"
+ system "./test"
+ end
end