summaryrefslogtreecommitdiff
path: root/tests/url/GNUmakefile
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@yahoo.com>2012-08-04 22:48:27 +0200
committerAndreas Baumann <abaumann@yahoo.com>2012-08-04 22:48:27 +0200
commitd78ee0aaa1f4bb4aebfee974d15a3ca65bce2467 (patch)
treedd2fbb81cd50314939912432dabacfcaf50a5ff4 /tests/url/GNUmakefile
parentf48058b91dc4eb326e7e2bd732044ed7b26f70f8 (diff)
downloadcrawler-d78ee0aaa1f4bb4aebfee974d15a3ca65bce2467.tar.gz
crawler-d78ee0aaa1f4bb4aebfee974d15a3ca65bce2467.tar.bz2
unified URL normalization tests
Diffstat (limited to 'tests/url/GNUmakefile')
-rw-r--r--tests/url/GNUmakefile46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/url/GNUmakefile b/tests/url/GNUmakefile
new file mode 100644
index 0000000..38645c9
--- /dev/null
+++ b/tests/url/GNUmakefile
@@ -0,0 +1,46 @@
+TOPDIR = ../..
+
+SUBDIRS =
+
+INCLUDE_DIRS = \
+ -I$(TOPDIR)/src
+
+INCLUDE_LDFLAGS =
+
+INCLUDE_LIBS = \
+ $(TOPDIR)/src/libcrawlingwolf.a \
+ $(TOPDIR)/googleurl/libgoogleurl.a \
+ -licui18n -licuuc
+
+TEST_CPP_BINS = \
+ test1$(EXE) \
+ test2$(EXE)
+
+OBJS =
+
+-include $(TOPDIR)/makefiles/gmake/sub.mk
+
+local_all:
+
+local_clean:
+ -@rm -f *.db *.db-journal 2>/dev/null
+ -@rm -f *.RES *.DIFF
+
+local_distclean:
+
+local_test:
+ @-for METHOD in simple google; do \
+ echo "Using URL normalizer '$$METHOD'.." ; \
+ ./exec_test test1 test1 "parse illegal protocol" $$METHOD www.andreasbaumann.cc ; \
+ ./exec_test test1 test2 "parse normal start URL without slash" $$METHOD http://www.andreasbaumann.cc ; \
+ ./exec_test test1 test3 "parse normal start URL with slash" $$METHOD http://www.andreasbaumann.cc/ ; \
+ ./exec_test test1 test4 "parse normal URL" $$METHOD http://www.andreasbaumann.cc/index.html ; \
+ ./exec_test test1 test5 "parse normal URL with default port" $$METHOD http://www.andreasbaumann.cc:80/index.html ; \
+ ./exec_test test1 test6 "parse normal URL with non-standard port" $$METHOD http://www.andreasbaumann.cc:8080/index.html ; \
+ ./exec_test test2 test100 "normalize a relative URL" $$METHOD http://www.andreasbaumann.cc/index.html /software.html ; \
+ ./exec_test test2 test101 "absolute URL in HTML content" $$METHOD http://www.andreasbaumann.cc/index.html http://www.yahoo.com/page.html ; \
+ ./exec_test test2 test102 "path normalization, relative path" $$METHOD http://www.andreasbaumann.cc/adir/index.html bdir/page.html ; \
+ ./exec_test test2 test103 "path normalization, absolute path" $$METHOD http://www.andreasbaumann.cc/adir/index.html /bdir/page.html ; \
+ ./exec_test test2 test104 "path normalization, current dir" $$METHOD http://www.andreasbaumann.cc/adir/index.html ./bdir/page.html ; \
+ ./exec_test test2 test105 "path normalization, previous dir" $$METHOD http://www.andreasbaumann.cc/adir/index.html ../bdir/page.html ; \
+ done