From b592976e93f2dae416a2f95d89479eb5226ab839 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Mon, 21 Nov 2011 12:20:49 +0000 Subject: [PATCH] Bump the Tika version for the updated TIKA-784 fix, and add an Alfresco side unit test for this case git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32138 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/content/MimetypeMapContentTest.java | 6 ++++ source/test-resources/quick/quickConcept.dita | 31 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 source/test-resources/quick/quickConcept.dita diff --git a/source/java/org/alfresco/repo/content/MimetypeMapContentTest.java b/source/java/org/alfresco/repo/content/MimetypeMapContentTest.java index 31846ef0c1..84e59a3f2d 100644 --- a/source/java/org/alfresco/repo/content/MimetypeMapContentTest.java +++ b/source/java/org/alfresco/repo/content/MimetypeMapContentTest.java @@ -78,6 +78,12 @@ public class MimetypeMapContentTest extends TestCase mimetypeService.guessMimetype("image.bmp", openQuickTestFile("quick.bmp")) ); + // Ones where we know about the parent, and Tika knows about the details + assertEquals( + "application/dita+xml", // Full version: application/dita+xml;format=concept + mimetypeService.guessMimetype("concept.dita", openQuickTestFile("quickConcept.dita")) + ); + // Alfresco Specific ones, that Tika doesn't know about assertEquals( "application/acp", diff --git a/source/test-resources/quick/quickConcept.dita b/source/test-resources/quick/quickConcept.dita new file mode 100644 index 0000000000..5c011480b6 --- /dev/null +++ b/source/test-resources/quick/quickConcept.dita @@ -0,0 +1,31 @@ + + + + The quick brown fox jumps over the lazy dog + Gym class featuring a brown fox and lazy dog + + Alfresco Documentation + + + Alfresco Software, Inc. + + + + Testing + + Pangram + Fox + Dog + + + Enterprise + + + + + + + +

The quick brown fox jumps over the lazy dog

+
+