Yegor Kozlov yegor at apache.org
Dominik Stadler centic at apache.org
- This build was tested with ant 1.6.2 although it will probably work with
- other versions. The following jar files should be available on the
- classpath when running ant:
+ This build was tested with ant 1.9.4 although it will probably work with
+ other versions, however at least 1.8.0 is required. The following jar
+ files should be available on the classpath when running ant:
LIBRARY LOCATION
======= ========
<property name="poi.test.locale" value="-Duser.language=en -Duser.country=US"/>
<property name="POI.testdata.path" value="test-data"/>
<property name="java.awt.headless" value="true"/>
+ <property name="additionaljar" value=""/>
<!-- Main: -->
<property name="main.resource1.dir" value="src/resources/main"/>
<jvmarg value="${poi.test.locale}"/>
<jvmarg value="-ea"/>
<jvmarg value="-Xmx256m"/>
+ <jvmarg value="-Dadditionaljar=${additionaljar}"/>
<formatter type="plain"/>
<formatter type="xml"/>
<batchtest todir="${main.reports.test}">
<syspropertyset refid="junit.properties"/>
<jvmarg value="${poi.test.locale}"/>
<jvmarg value="-ea"/>
+ <jvmarg value="-Dadditionaljar=${additionaljar}"/>
<!--
YK: ensure that JUnit has enough memory to run tests.
Without the line below tests fail on Mac OS X with jdk-1.6.26
<syspropertyset refid="junit.properties"/>
<jvmarg value="${poi.test.locale}"/>
<jvmarg value="-ea"/>
+ <jvmarg value="-Dadditionaljar=${additionaljar}"/>
<formatter type="plain"/>
<formatter type="xml"/>
<batchtest todir="${ooxml.reports.test}">
<syspropertyset refid="junit.properties"/>
<jvmarg value="${poi.test.locale}"/>
<jvmarg value="-ea"/>
+ <jvmarg value="-Dadditionaljar=${additionaljar}"/>
<formatter type="plain"/>
<formatter type="xml"/>
<batchtest todir="${ooxml.reports.test}">
<syspropertyset refid="junit.properties"/>
<jvmarg value="${poi.test.locale}"/>
<jvmarg value="-ea"/>
+ <jvmarg value="-Dadditionaljar=${additionaljar}"/>
<formatter type="plain"/>
<formatter type="xml"/>
<batchtest todir="${excelant.reports.test}">
================================================================= */ \r
package org.apache.poi.poifs.crypt;\r
\r
-import static org.junit.Assert.assertEquals;\r
-import static org.junit.Assert.assertFalse;\r
-import static org.junit.Assert.assertNotNull;\r
-import static org.junit.Assert.assertTrue;\r
+import static org.junit.Assert.*;\r
\r
import java.io.File;\r
import java.io.FileInputStream;\r
import org.bouncycastle.cert.ocsp.OCSPResp;\r
import org.etsi.uri.x01903.v13.DigestAlgAndValueType;\r
import org.etsi.uri.x01903.v13.QualifyingPropertiesType;\r
+import org.junit.Assume;\r
import org.junit.BeforeClass;\r
import org.junit.Test;\r
import org.w3.x2000.x09.xmldsig.ReferenceType;\r
cal.clear();\r
cal.setTimeZone(TimeZone.getTimeZone("UTC"));\r
cal.set(2014, 7, 6, 21, 42, 12);\r
+\r
+ // don't run this test when we are using older Xerces as it triggers an XML Parser backwards compatibility issue \r
+ // in the xmlsec jar file\r
+ String additionalJar = System.getProperty("additionaljar");\r
+ //System.out.println("Having: " + additionalJar);\r
+ Assume.assumeTrue("Not running TestSignatureInfo because we are testing with additionaljar set to " + additionalJar, \r
+ additionalJar == null || additionalJar.trim().length() == 0);\r
}\r
\r
@Test\r