[tracker-miners: 1/4] functional-tests: Add tracker-extract tests for ps and ps.gz



commit d29a08c60eb1ab8c96b4c4788c9de304784343ad
Author: Andrea Azzarone <andrea azzarone canonical com>
Date:   Tue Apr 23 10:43:27 2019 +0000

    functional-tests: Add tracker-extract tests for ps and ps.gz

 tests/functional-tests/meson.build                       |   5 +++++
 .../test-extraction-data/office/ps-doc.expected.json     |  15 +++++++++++++++
 .../test-extraction-data/office/ps-doc.ps                |  11 +++++++++++
 .../test-extraction-data/office/psgz-doc.expected.json   |  15 +++++++++++++++
 .../test-extraction-data/office/psgz-doc.ps.gz           | Bin 0 -> 159 bytes
 5 files changed, 46 insertions(+)
---
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index a24cfe491..c30b61218 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -16,8 +16,13 @@ extractor_tests = [
   'office/office-doc',
   'office/powerpoint',
   'office/pdf-doc',
+  'office/ps-doc'
 ]
 
+if get_option('unzip_ps_gz_files')
+  extractor_tests += 'office/psgz-doc'
+endif
+
 functional_tests = [
   '300-miner-basic-ops',
   '301-miner-resource-removal',
diff --git a/tests/functional-tests/test-extraction-data/office/ps-doc.expected.json 
b/tests/functional-tests/test-extraction-data/office/ps-doc.expected.json
new file mode 100644
index 000000000..dd4a092bb
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/office/ps-doc.expected.json
@@ -0,0 +1,15 @@
+{
+    "test": {
+        "Filename": "ps-doc.ps",
+        "Comment": "PS document from the office tools"
+    },
+    "metadata": {
+        "nfo:pageCount": 1,
+        "nie:copyright": "copyleft",
+        "nco:creator": {
+            "nco:fullname": "vi",
+            "@type": "nco:Contact"
+        },
+        "@type": "nfo:PaginatedTextDocument"
+    }
+}
diff --git a/tests/functional-tests/test-extraction-data/office/ps-doc.ps 
b/tests/functional-tests/test-extraction-data/office/ps-doc.ps
new file mode 100644
index 000000000..20b91d049
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/office/ps-doc.ps
@@ -0,0 +1,11 @@
+%!PS
+%%Copyright: copyleft
+%%Title: Hello World!
+%%Creator: vi
+%%Pages: 1
+%%EndComments
+/Courier
+20 selectfont
+72 500 moveto
+(Hello world!) show
+showpage
diff --git a/tests/functional-tests/test-extraction-data/office/psgz-doc.expected.json 
b/tests/functional-tests/test-extraction-data/office/psgz-doc.expected.json
new file mode 100644
index 000000000..07b6dd5f9
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/office/psgz-doc.expected.json
@@ -0,0 +1,15 @@
+{
+    "test": {
+        "Filename": "psgz-doc.ps.gz",
+        "Comment": "PS.GZ document from the office tools"
+    },
+    "metadata": {
+        "nfo:pageCount": 1,
+        "nie:copyright": "copyleft",
+        "nco:creator": {
+            "nco:fullname": "vi",
+            "@type": "nco:Contact"
+        },
+        "@type": "nfo:PaginatedTextDocument"
+    }
+}
diff --git a/tests/functional-tests/test-extraction-data/office/psgz-doc.ps.gz 
b/tests/functional-tests/test-extraction-data/office/psgz-doc.ps.gz
new file mode 100644
index 000000000..c56d7763f
Binary files /dev/null and b/tests/functional-tests/test-extraction-data/office/psgz-doc.ps.gz differ


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]