]> source.dussan.org Git - poi.git/commitdiff
Add ignored test for #59780, and specially-crafted test file
authorNick Burch <nick@apache.org>
Mon, 4 Jul 2016 20:26:40 +0000 (20:26 +0000)
committerNick Burch <nick@apache.org>
Mon, 4 Jul 2016 20:26:40 +0000 (20:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1751375 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/openxml4j/opc/TestPackageCoreProperties.java
test-data/openxml4j/OPCCompliance_CoreProperties_AlternateTimezones.docx [new file with mode: 0644]

index 612371506d0bd7bcd69d3f4e498584301105c166..e8bbcd9bdfe6878e1c3b6b12e709858fe1bfe305 100644 (file)
@@ -271,4 +271,23 @@ public final class TestPackageCoreProperties {
         wb.close();
         pkg.close();
     }
+       
+       @Test
+       @Ignore
+       public void testAlternateCorePropertyTimezones() throws Exception {
+        InputStream is = OpenXML4JTestDataSamples.openSampleStream("OPCCompliance_CoreProperties_AlternateTimezones.docx");
+        OPCPackage pkg = OPCPackage.open(is);
+        PackagePropertiesPart props = (PackagePropertiesPart)pkg.getPackageProperties();
+        is.close();
+
+        // Check text properties first
+        assertEquals("Lorem Ipsu", props.getTitleProperty().getValue());
+        assertEquals("Apache POI", props.getCreatorProperty().getValue());
+        
+        // Created at has a +3 timezone and milliseconds
+        //   2006-10-13T18:06:00.1234+03:00
+        
+        // Modified at has a -13 timezone but no milliseconds
+        //   2007-06-20T07:59:00-13:00
+       }
 }
diff --git a/test-data/openxml4j/OPCCompliance_CoreProperties_AlternateTimezones.docx b/test-data/openxml4j/OPCCompliance_CoreProperties_AlternateTimezones.docx
new file mode 100644 (file)
index 0000000..8b4de4a
Binary files /dev/null and b/test-data/openxml4j/OPCCompliance_CoreProperties_AlternateTimezones.docx differ