mirror of https://github.com/apache/poi.git
remove *_dump directory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1765734 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d64fea0cfe
commit
ecef10cb7b
|
@ -52,7 +52,7 @@ public class TestPOIFSDump {
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws IOException {
|
public void tearDown() throws IOException {
|
||||||
// clean up the directory that POIFSDump writes to
|
// clean up the directory that POIFSDump writes to
|
||||||
deleteDirectory(new File(new File(TEST_FILE).getName()));
|
deleteDirectory(new File(new File(TEST_FILE+"_dump").getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void deleteDirectory(File directory) throws IOException {
|
public static void deleteDirectory(File directory) throws IOException {
|
||||||
|
@ -172,7 +172,7 @@ public class TestPOIFSDump {
|
||||||
POIFSDump.main(new String[] {});
|
POIFSDump.main(new String[] {});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test(expected=IndexOutOfBoundsException.class)
|
||||||
public void testFailToWrite() throws IOException {
|
public void testFailToWrite() throws IOException {
|
||||||
File dir = TempFile.createTempFile("TestPOIFSDump", ".tst");
|
File dir = TempFile.createTempFile("TestPOIFSDump", ".tst");
|
||||||
assertTrue("Had: " + dir, dir.exists());
|
assertTrue("Had: " + dir, dir.exists());
|
||||||
|
@ -186,13 +186,8 @@ public class TestPOIFSDump {
|
||||||
NPropertyTable props = fs.getPropertyTable();
|
NPropertyTable props = fs.getPropertyTable();
|
||||||
assertNotNull(props);
|
assertNotNull(props);
|
||||||
|
|
||||||
try {
|
// try with an invalid startBlock to trigger an exception
|
||||||
// try with an invalid startBlock to trigger an exception
|
// to validate that file-handles are closed properly
|
||||||
// to validate that file-handles are closed properly
|
POIFSDump.dump(fs, 999999999, "mini-stream", dir);
|
||||||
POIFSDump.dump(fs, 999999999, "mini-stream", dir);
|
|
||||||
fail("Should catch exception here");
|
|
||||||
} catch (IndexOutOfBoundsException e) {
|
|
||||||
// expected here
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue