mirror of https://github.com/apache/poi.git
As discussed at ApacheCon: Try to automatically find test-data in unit tests, this makes it easier to get going in Eclipse or other IDEs.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1706752 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ea73cb013e
commit
1cff226bcc
|
@ -197,8 +197,12 @@ public final class POIDataSamples {
|
|||
return;
|
||||
}
|
||||
|
||||
throw new RuntimeException("Must set system property '" +
|
||||
TEST_PROPERTY + "' before running tests");
|
||||
if(new File("test-data").exists()) {
|
||||
dataDirName = "test-data";
|
||||
} else {
|
||||
throw new RuntimeException("Must set system property '" +
|
||||
TEST_PROPERTY + "' before running tests");
|
||||
}
|
||||
}
|
||||
File dataDir = new File(dataDirName, _moduleDir);
|
||||
if (!dataDir.exists()) {
|
||||
|
|
Loading…
Reference in New Issue