mirror of https://github.com/apache/poi.git
Fix ROOT_DIR
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787330 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c2bce0370e
commit
f1ccb8577f
|
@ -85,7 +85,7 @@ import org.junit.runners.Parameterized.Parameters;
|
||||||
@RunWith(Parameterized.class)
|
@RunWith(Parameterized.class)
|
||||||
public class TestAllFiles {
|
public class TestAllFiles {
|
||||||
|
|
||||||
private static final File ROOT_DIR = new File("C:/users/tallison/idea projects/poi-trunk/test-data");
|
private static final File ROOT_DIR = new File("test-data");
|
||||||
|
|
||||||
static final String[] SCAN_EXCLUDES = new String[] { "**/.svn/**", "lost+found" };
|
static final String[] SCAN_EXCLUDES = new String[] { "**/.svn/**", "lost+found" };
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ public class XSSFBFileHandler extends AbstractFileHandler {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleFile(InputStream stream) throws Exception {
|
public void handleFile(InputStream stream) throws Exception {
|
||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
|
@ -54,13 +53,11 @@ public class XSSFBFileHandler extends AbstractFileHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
testNotHandledByWorkbookException(OPCPackage.open(new ByteArrayInputStream(bytes)));
|
testNotHandledByWorkbookException(OPCPackage.open(new ByteArrayInputStream(bytes)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testNotHandledByWorkbookException(OPCPackage pkg) throws IOException {
|
private void testNotHandledByWorkbookException(OPCPackage pkg) throws IOException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
XSSFWorkbook workbook = new XSSFWorkbook(pkg);
|
new XSSFWorkbook(pkg);
|
||||||
} catch (XLSBUnsupportedException e) {
|
} catch (XLSBUnsupportedException e) {
|
||||||
//this is what we'd expect
|
//this is what we'd expect
|
||||||
//swallow
|
//swallow
|
||||||
|
@ -90,7 +87,5 @@ public class XSSFBFileHandler extends AbstractFileHandler {
|
||||||
if (txt.length() < 1) {
|
if (txt.length() < 1) {
|
||||||
throw new RuntimeException("Should have gotten some text.");
|
throw new RuntimeException("Should have gotten some text.");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue