diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2014-04-25 10:44:58 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2014-04-25 10:44:58 +0200 |
commit | eb3771cafb98451116a4f0ec0e7a371800770de1 (patch) | |
tree | 9752ff9c7944b98c7d1c55998d8d89d9f01fd4f7 /tests | |
parent | 8d0167bb5aaf1f4d3038c4f5d59ca9fd08edaee2 (diff) | |
download | crawler-eb3771cafb98451116a4f0ec0e7a371800770de1.tar.gz crawler-eb3771cafb98451116a4f0ec0e7a371800770de1.tar.bz2 |
fixed MIME detection using libmagic
Diffstat (limited to 'tests')
-rw-r--r-- | tests/typedetect/GNUmakefile | 4 | ||||
-rw-r--r-- | tests/typedetect/test10.MUST | 1 | ||||
-rw-r--r-- | tests/typedetect/test10.odt | bin | 0 -> 12305 bytes | |||
-rw-r--r-- | tests/typedetect/test3.MUST | 2 | ||||
-rw-r--r-- | tests/typedetect/test5.MUST | 2 | ||||
-rw-r--r-- | tests/typedetect/test7.MUST | 1 | ||||
-rw-r--r-- | tests/typedetect/test7.xml | 11 | ||||
-rw-r--r-- | tests/typedetect/test8.MUST | 1 | ||||
-rw-r--r-- | tests/typedetect/test8.txt | 4 | ||||
-rw-r--r-- | tests/typedetect/test9.MUST | 1 | ||||
-rw-r--r-- | tests/typedetect/test9.docx | bin | 0 -> 3950 bytes |
11 files changed, 25 insertions, 2 deletions
diff --git a/tests/typedetect/GNUmakefile b/tests/typedetect/GNUmakefile index 7fcddac..2455556 100644 --- a/tests/typedetect/GNUmakefile +++ b/tests/typedetect/GNUmakefile @@ -64,6 +64,10 @@ local_test: ./exec_test test1 test4 "detect a HTML file" $$METHOD file_fetcher file://localhost/`pwd`/test4.html ; \ ./exec_test test1 test5 "detect a CSS file" $$METHOD file_fetcher file://localhost/`pwd`/test5.css ; \ ./exec_test test1 test6 "detect a Javascript file" $$METHOD file_fetcher file://localhost/`pwd`/test6.js ; \ + ./exec_test test1 test7 "detect an XML file" $$METHOD file_fetcher file://localhost/`pwd`/test7.xml ; \ + ./exec_test test1 test8 "detect a robots.txt file" $$METHOD file_fetcher file://localhost/`pwd`/test8.txt ; \ + ./exec_test test1 test9 "detect a DOCX file" $$METHOD file_fetcher file://localhost/`pwd`/test9.docx ; \ + ./exec_test test1 test10 "detect a Libreoffice text file" $$METHOD file_fetcher file://localhost/`pwd`/test10.odt ; \ done @-echo "Using fetcher 'libfetch'" @-for METHOD in libmagic_typedetect; do \ diff --git a/tests/typedetect/test10.MUST b/tests/typedetect/test10.MUST new file mode 100644 index 0000000..e6d42f9 --- /dev/null +++ b/tests/typedetect/test10.MUST @@ -0,0 +1 @@ +MIME type: application/vnd.oasis.opendocument.text diff --git a/tests/typedetect/test10.odt b/tests/typedetect/test10.odt Binary files differnew file mode 100644 index 0000000..2fa42c5 --- /dev/null +++ b/tests/typedetect/test10.odt diff --git a/tests/typedetect/test3.MUST b/tests/typedetect/test3.MUST index 882a5a7..3e2cb78 100644 --- a/tests/typedetect/test3.MUST +++ b/tests/typedetect/test3.MUST @@ -1 +1 @@ -MIME type: application/msword +MIME type: application/vnd.ms-office diff --git a/tests/typedetect/test5.MUST b/tests/typedetect/test5.MUST index a0da142..ab50c85 100644 --- a/tests/typedetect/test5.MUST +++ b/tests/typedetect/test5.MUST @@ -1 +1 @@ -MIME type: text/x-asm +MIME type: text/plain diff --git a/tests/typedetect/test7.MUST b/tests/typedetect/test7.MUST new file mode 100644 index 0000000..c219858 --- /dev/null +++ b/tests/typedetect/test7.MUST @@ -0,0 +1 @@ +MIME type: application/xml diff --git a/tests/typedetect/test7.xml b/tests/typedetect/test7.xml new file mode 100644 index 0000000..a37b2cc --- /dev/null +++ b/tests/typedetect/test7.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<catalog> + <cd> + <title>Empire Burlesque</title> + <artist>Bob Dylan</artist> + <country>USA</country> + <company>Columbia</company> + <price>10.90</price> + <year>1985</year> + </cd> +</catalog> diff --git a/tests/typedetect/test8.MUST b/tests/typedetect/test8.MUST new file mode 100644 index 0000000..ab50c85 --- /dev/null +++ b/tests/typedetect/test8.MUST @@ -0,0 +1 @@ +MIME type: text/plain diff --git a/tests/typedetect/test8.txt b/tests/typedetect/test8.txt new file mode 100644 index 0000000..68b0ad4 --- /dev/null +++ b/tests/typedetect/test8.txt @@ -0,0 +1,4 @@ +User-agent: * +Disallow: /javascript +Disallow: /img +Sitemap: http://localhost/sitemap.xml diff --git a/tests/typedetect/test9.MUST b/tests/typedetect/test9.MUST new file mode 100644 index 0000000..027666c --- /dev/null +++ b/tests/typedetect/test9.MUST @@ -0,0 +1 @@ +MIME type: application/vnd.openxmlformats-officedocument.wordprocessingml.document diff --git a/tests/typedetect/test9.docx b/tests/typedetect/test9.docx Binary files differnew file mode 100644 index 0000000..f8353f1 --- /dev/null +++ b/tests/typedetect/test9.docx |