don't leave behind files when running unit tests. In the future this should be revisited to verify POI isn't writing workbooks that are unopenable/corrupt by applications that read POI's formats (MS Office, OpenOffice, LibreOffice, etc)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1711920 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e88fac62ef
commit
3c18d6aa7b
@ -114,11 +114,15 @@ public class TestFormulaParser extends TestCase {
|
|||||||
XSSFTestDataSamples.writeOutAndReadBack(wb).close();
|
XSSFTestDataSamples.writeOutAndReadBack(wb).close();
|
||||||
|
|
||||||
// Manually check to make sure file isn't corrupted
|
// Manually check to make sure file isn't corrupted
|
||||||
|
// TODO: develop a process for occasionally manually reviewing workbooks
|
||||||
|
// to verify workbooks are not corrupted
|
||||||
|
/*
|
||||||
final File fileIn = XSSFTestDataSamples.getSampleFile(testFile);
|
final File fileIn = XSSFTestDataSamples.getSampleFile(testFile);
|
||||||
final File reSavedFile = new File(fileIn.getParentFile(), fileIn.getName().replace(".xlsm", "-saved.xlsm"));
|
final File reSavedFile = new File(fileIn.getParentFile(), fileIn.getName().replace(".xlsm", "-saved.xlsm"));
|
||||||
final FileOutputStream fos = new FileOutputStream(reSavedFile);
|
final FileOutputStream fos = new FileOutputStream(reSavedFile);
|
||||||
wb.write(fos);
|
wb.write(fos);
|
||||||
fos.close();
|
fos.close();
|
||||||
|
*/
|
||||||
} finally {
|
} finally {
|
||||||
wb.close();
|
wb.close();
|
||||||
}
|
}
|
||||||
|
@ -161,11 +161,15 @@ public final class TestFormulaParser extends TestCase {
|
|||||||
assertEqualsIgnoreCase("yourFunc", wb2.getName("yourFunc").getNameName());
|
assertEqualsIgnoreCase("yourFunc", wb2.getName("yourFunc").getNameName());
|
||||||
|
|
||||||
// Manually check to make sure file isn't corrupted
|
// Manually check to make sure file isn't corrupted
|
||||||
|
// TODO: develop a process for occasionally manually reviewing workbooks
|
||||||
|
// to verify workbooks are not corrupted
|
||||||
|
/*
|
||||||
final File fileIn = HSSFTestDataSamples.getSampleFile(testFile);
|
final File fileIn = HSSFTestDataSamples.getSampleFile(testFile);
|
||||||
final File reSavedFile = new File(fileIn.getParentFile(), fileIn.getName().replace(".xls", "-saved.xls"));
|
final File reSavedFile = new File(fileIn.getParentFile(), fileIn.getName().replace(".xls", "-saved.xls"));
|
||||||
FileOutputStream fos = new FileOutputStream(reSavedFile);
|
FileOutputStream fos = new FileOutputStream(reSavedFile);
|
||||||
wb2.write(fos);
|
wb2.write(fos);
|
||||||
fos.close();
|
fos.close();
|
||||||
|
*/
|
||||||
} finally {
|
} finally {
|
||||||
wb2.close();
|
wb2.close();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user