Author: nick
Date: Wed Dec 23 20:40:00 2015
New Revision: 1721576

URL: http://svn.apache.org/viewvc?rev=1721576&view=rev
Log:
TIKA-1817 Test DXF ASCII file, and detection unit test

Added:
    tika/trunk/tika-parsers/src/test/resources/test-documents/testDXF_ascii.dxf
Modified:
    tika/trunk/LICENSE.txt
    
tika/trunk/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java

Modified: tika/trunk/LICENSE.txt
URL: 
http://svn.apache.org/viewvc/tika/trunk/LICENSE.txt?rev=1721576&r1=1721575&r2=1721576&view=diff
==============================================================================
--- tika/trunk/LICENSE.txt (original)
+++ tika/trunk/LICENSE.txt Wed Dec 23 20:40:00 2015
@@ -370,3 +370,11 @@ JUnRAR (https://github.com/edmund-wagner
 Sqlite (bundled in org.xerial's sqlite-jdbc)
     This product bundles Sqlite, which is in the Public Domain.  For details
     see: https://www.sqlite.org/copyright.html
+
+Sample DXF file testDXF.dxf (in tika-parsers/src/test/resources/test-documents)
+     Copyright 2012 Ho Thanh Tam, www.cadkit.net
+
+     Permission to use, copy, modify, and distribute this software and its 
+     documentation for any purpose is hereby granted without fee, provided 
+     that the above copyright notice, author statement appear in all copies 
+     of this software and related documentation.

Modified: 
tika/trunk/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java
URL: 
http://svn.apache.org/viewvc/tika/trunk/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java?rev=1721576&r1=1721575&r2=1721576&view=diff
==============================================================================
--- 
tika/trunk/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java 
(original)
+++ 
tika/trunk/tika-parsers/src/test/java/org/apache/tika/mime/TestMimeTypes.java 
Wed Dec 23 20:40:00 2015
@@ -531,11 +531,17 @@ public class TestMimeTypes {
     }
 
     @Test
-    public void testDwgDetection() throws Exception {
+    public void testAutoCADDetection() throws Exception {
         assertTypeByName("image/vnd.dwg", "x.dwg");
         assertTypeByData("image/vnd.dwg", "testDWG2004.dwg");
         assertTypeByData("image/vnd.dwg", "testDWG2007.dwg");
         assertTypeByData("image/vnd.dwg", "testDWG2010.dwg");
+        
+        // From name, gets the common parent type
+        assertTypeByName("image/vnd.dxf", "x.dxf");
+        // With the data, can work out it's the ASCII flavour
+        assertTypeByData("image/vnd.dxf; format=ascii", "testDXF_ascii.dxf");
+        // TODO Get a sample Binary DXF file and test
     }
 
     @Test


Reply via email to