Update test to not depend on an existing build-directory
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1708682 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
05c161b6cf
commit
e9d0e9cc12
@ -1200,9 +1200,9 @@ public final class TestHSSFWorkbook extends BaseTestWorkbook {
|
||||
|
||||
@Test
|
||||
public void testRewriteFileBug58480() throws Exception {
|
||||
final File file = new File(
|
||||
"build/HSSFWorkbookTest-testWriteScenario.xls");
|
||||
final File file = TempFile.createTempFile("TestHSSFWorkbook", ".xls");
|
||||
|
||||
try {
|
||||
// create new workbook
|
||||
{
|
||||
final Workbook workbook = new HSSFWorkbook();
|
||||
@ -1227,6 +1227,10 @@ public final class TestHSSFWorkbook extends BaseTestWorkbook {
|
||||
fs.close();
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
assertTrue(file.exists());
|
||||
assertTrue(file.delete());
|
||||
}
|
||||
}
|
||||
|
||||
private void writeAndCloseWorkbook(Workbook workbook, File file)
|
||||
|
Loading…
Reference in New Issue
Block a user