tinyxml: add test
Closes Homebrew/homebrew#35397. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
515a319dac
commit
d94bdf72c8
1 changed files with 19 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue