Also look for test-data in ../test-data for Gradle build

This is needed when running tests in the IDE via the Gradle project import

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888417 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2021-04-06 06:10:46 +00:00
parent 06707dca89
commit ddc13a4c48

View File

@ -120,7 +120,7 @@ public final class POIDataSamples {
if(_instXmlDSign == null) _instXmlDSign = new POIDataSamples("xmldsign");
return _instXmlDSign;
}
/**
* Opens a sample file from the test data directory
*
@ -197,8 +197,10 @@ public final class POIDataSamples {
return;
}
if(new File("test-data").exists()) {
dataDirName = "test-data";
if (new File("test-data").exists()) {
dataDirName = "test-data";
} else if (new File("../test-data").exists()) {
dataDirName = "../test-data";
} else {
throw new RuntimeException("Must set system property '" +
TEST_PROPERTY + "' before running tests");