diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2014-06-15 22:43:14 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2014-06-15 22:43:14 +0200 |
commit | ce77513807f47bc7af59c8320932d3348aeb99ea (patch) | |
tree | 495393883edf95519a4faf60342194257611ef62 /tests | |
parent | 39ee887e91e0c7920193f7a519693b70f7de5a99 (diff) | |
download | crawler-ce77513807f47bc7af59c8320932d3348aeb99ea.tar.gz crawler-ce77513807f47bc7af59c8320932d3348aeb99ea.tar.bz2 |
added tinyxml and ticpp
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tinyxml/GNUmakefile | 27 | ||||
-rwxr-xr-x | tests/tinyxml/Makefile.W32 | 33 | ||||
-rw-r--r-- | tests/tinyxml/broken.xml | 28 | ||||
-rw-r--r-- | tests/tinyxml/test.xml | 27 | ||||
-rw-r--r-- | tests/tinyxml/test1.cpp | 21 |
5 files changed, 136 insertions, 0 deletions
diff --git a/tests/tinyxml/GNUmakefile b/tests/tinyxml/GNUmakefile new file mode 100644 index 0000000..36b643e --- /dev/null +++ b/tests/tinyxml/GNUmakefile @@ -0,0 +1,27 @@ +TOPDIR = ../.. + +SUBDIRS = + +INCLUDE_DIRS = \ + -I$(TOPDIR)/textwolf/include + +INCLUDE_LDFLAGS = \ + +INCLUDE_LIBS = \ + +TEST_CPP_BINS = \ + test1$(EXE) + +OBJS = + +-include $(TOPDIR)/makefiles/gmake/sub.mk + +local_all: + +local_clean: + +local_distclean: + +local_test: + @./test1 test.xml + @./test1 broken.xml diff --git a/tests/tinyxml/Makefile.W32 b/tests/tinyxml/Makefile.W32 new file mode 100755 index 0000000..39c436e --- /dev/null +++ b/tests/tinyxml/Makefile.W32 @@ -0,0 +1,33 @@ +TOPDIR = ..\.. + +SUBDIRS = + +!INCLUDE $(TOPDIR)\makefiles\nmake\platform.mk + +INCLUDE_CXXFLAGS = \ + /D_WIN32_WINNT=0x504 + +INCLUDE_DIRS = \ + /I. \ + /I$(TOPDIR)\textwolf\include + +INCLUDE_LDFLAGS = \ + +INCLUDE_LIBS = \ + +TEST_CPP_BINS = \ + test1.exe + +OBJS = + +!INCLUDE $(TOPDIR)\makefiles\nmake\sub.mk + +test1.exe: test1.obj + +local_all: + +local_clean: + +local_distclean: + +local_test: diff --git a/tests/tinyxml/broken.xml b/tests/tinyxml/broken.xml new file mode 100644 index 0000000..6fb5c7a --- /dev/null +++ b/tests/tinyxml/broken.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_atf_fr.xml</loc> + <lastmod>2014-06-14T10:10:03Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_cedh_fr.xml</loc> + <lastmod>2014-06-14T10:10:01Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_atf_it.xml</loc> + <lastmod>2014-06-14T10:10:04Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_cedh_it.xml</loc> + <lastmod>2014-06-14T10:10:01Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_cedh_de.xml</loc> + <lastmod>2014-06-14T10:10:01Z</lastmod> + </sitemap> + <sitemap> + <unterminated_tag> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_atf_de.xml</loc> + <lastmod>2014-06-14T10:10:02Z</lastmod> + </sitemap> +</sitemapindex> diff --git a/tests/tinyxml/test.xml b/tests/tinyxml/test.xml new file mode 100644 index 0000000..07575e2 --- /dev/null +++ b/tests/tinyxml/test.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_atf_fr.xml</loc> + <lastmod>2014-06-14T10:10:03Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_cedh_fr.xml</loc> + <lastmod>2014-06-14T10:10:01Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_atf_it.xml</loc> + <lastmod>2014-06-14T10:10:04Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_cedh_it.xml</loc> + <lastmod>2014-06-14T10:10:01Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_cedh_de.xml</loc> + <lastmod>2014-06-14T10:10:01Z</lastmod> + </sitemap> + <sitemap> + <loc>http://relevancy.bger.ch/sitemaps/sitemap_atf_de.xml</loc> + <lastmod>2014-06-14T10:10:02Z</lastmod> + </sitemap> +</sitemapindex> diff --git a/tests/tinyxml/test1.cpp b/tests/tinyxml/test1.cpp new file mode 100644 index 0000000..4e923ef --- /dev/null +++ b/tests/tinyxml/test1.cpp @@ -0,0 +1,21 @@ + +#include <iostream> +#include <fstream> + +using namespace std; + +int main( int argc, char *argv[] ) +{ + if( argc != 2 ) { + cerr << "Usage: test1 <XML file>\n" << endl; + return 1; + } + + char *xmlFileName = argv[1]; + + ifstream xmlFile( xmlFileName ); + if( !xmlFile.good( ) ) { + cerr << "ERROR: Can't open file '" << xmlFileName << "'" << endl; + return 1; + } +} |