[tracker-miners/sam/better-odt-extraction: 2/2] functional-tests: Add a testcase for the OASIS extractor



commit 2ad36bcd36cd4f3c40468b5fdf79f94c7f4e3854
Author: Sam Thursfield <sam afuera me uk>
Date:   Thu Aug 1 13:06:03 2019 +0200

    functional-tests: Add a testcase for the OASIS extractor
    
    We now have a LibreOffice Writer document, taken from
    https://gitlab.gnome.org/GNOME/tracker/issues/109.

 tests/functional-tests/meson.build                      |   1 +
 .../test-extraction-data/office/oasis-doc.expected.json |  14 ++++++++++++++
 .../test-extraction-data/office/oasis-doc.odt           | Bin 0 -> 12493 bytes
 3 files changed, 15 insertions(+)
---
diff --git a/tests/functional-tests/meson.build b/tests/functional-tests/meson.build
index d3c4bd3ce..873f7363b 100644
--- a/tests/functional-tests/meson.build
+++ b/tests/functional-tests/meson.build
@@ -20,6 +20,7 @@ extractor_tests = [
   'images/comment-extension-block',
   'images/roi',
   'playlists/playlist-test-1',
+  'office/oasis-doc',
   'office/office-doc',
   'office/powerpoint',
   'office/pdf-doc',
diff --git a/tests/functional-tests/test-extraction-data/office/oasis-doc.expected.json 
b/tests/functional-tests/test-extraction-data/office/oasis-doc.expected.json
new file mode 100644
index 000000000..93d736f76
--- /dev/null
+++ b/tests/functional-tests/test-extraction-data/office/oasis-doc.expected.json
@@ -0,0 +1,14 @@
+{
+    "test": {
+        "Filename": "oasis-doc.odt",
+        "Comment": "LibreOffice document, taken from https://gitlab.gnome.org/GNOME/tracker/issues/109";
+    },
+    "metadata": {
+        "@type" : "nfo:PaginatedTextDocument",
+        "nfo:pageCount" : "1",
+        "nie:contentCreated" : "2019-05-23T19:20:16.211562799",
+        "nfo:wordCount" : "200",
+        "nie:generator" : "LibreOffice/6.2.3.2$Linux_X86_64 LibreOffice_project/20$Build-2",
+        "nie:plainTextContent" : "A wonderful serenity has taken possession of my entire soul, like these 
sweet mornings of spring which I enjoy with my whole heart. I am alone, and feel the charm of existence in 
this spot, which was created for the bliss of souls like Wandabuz. I am so happy, my dear friend, so 
absorbissimmo in the exquisite sense of mere tranquil existence, that I neglect my talents. I should be 
incapable of drawing a single stroke at the present moment; and yet I feel that I never was a greater artist 
than now. When, while the lovely valley teems with vapour around me, and the meridian sun strikes the upper 
surface of the impenetrable foliage of my trees, and but a few stray gleams steal into the inner sanctuary, I 
throw myself down among the tall grass by the trickling stream; and, as I lie close to the earth, a thousand 
unknown plants are noticed by me: when I hear the buzz of the little world among the stalks, and grow 
familiar with the countless indes
 cribable
  forms of the insectodoits and flies, then I feel the presence of the Almighty, who formed us in his own 
image, and the breath."
+    }
+}
diff --git a/tests/functional-tests/test-extraction-data/office/oasis-doc.odt 
b/tests/functional-tests/test-extraction-data/office/oasis-doc.odt
new file mode 100644
index 000000000..b042261a3
Binary files /dev/null and b/tests/functional-tests/test-extraction-data/office/oasis-doc.odt differ


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