]> source.dussan.org Git - poi.git/commitdiff
Add test file for bug #51873 from Jeremy, and a test that uses it
authorNick Burch <nick@apache.org>
Mon, 5 Dec 2011 05:12:23 +0000 (05:12 +0000)
committerNick Burch <nick@apache.org>
Mon, 5 Dec 2011 05:12:23 +0000 (05:12 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1210332 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/testcases/org/apache/poi/hsmf/parsers/TestPOIFSChunkParser.java
test-data/hsmf/51873.msg [new file with mode: 0644]

index 2ef19603e7fc143b43de5ac4b2839e907b973dd7..721f60591cbadf35d987c11709e55a09c9ea1984 100644 (file)
@@ -332,5 +332,21 @@ public final class TestPOIFSChunkParser extends TestCase {
       } catch(ChunkNotFoundException e) {
          fail();
       }
-       }
+   }
+       
+   /**
+    * Bugzilla #51873 - Outlook 2002 files created with dragging and
+    *  dropping files to the disk include a non-standard named streams
+    *  such as "Olk10SideProps_0001"
+    */
+   public void testOlk10SideProps() throws Exception {
+      POIFSFileSystem poifs = new POIFSFileSystem(
+          new FileInputStream(samples.getFile("51873.msg"))
+      );
+      MAPIMessage msg = new MAPIMessage(poifs);
+
+      // Check core details came through
+      assertEquals("bubba@bubbasmith.com", msg.getDisplayTo());
+      assertEquals("Test with Olk10SideProps_ Chunk", msg.getSubject());
+   }
 }
diff --git a/test-data/hsmf/51873.msg b/test-data/hsmf/51873.msg
new file mode 100644 (file)
index 0000000..28a0a57
Binary files /dev/null and b/test-data/hsmf/51873.msg differ