summaryrefslogtreecommitdiffstats
path: root/poi
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2021-11-25 22:55:15 +0000
committerAndreas Beeker <kiwiwings@apache.org>2021-11-25 22:55:15 +0000
commitd4c649ae58d0115079091bbdc77dde8b95f15ca7 (patch)
treec9e8011a977c496f45fb9f2bc9ba3d094e3395d0 /poi
parent9ed220fd759593d8984ba5cfecdeaac670059117 (diff)
downloadpoi-d4c649ae58d0115079091bbdc77dde8b95f15ca7.tar.gz
poi-d4c649ae58d0115079091bbdc77dde8b95f15ca7.zip
use temp directory instead of test-data
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1895344 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r--poi/src/test/java/org/apache/poi/hpsf/basic/TestWrite.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/poi/src/test/java/org/apache/poi/hpsf/basic/TestWrite.java b/poi/src/test/java/org/apache/poi/hpsf/basic/TestWrite.java
index 7d1df36fb8..32b35eb991 100644
--- a/poi/src/test/java/org/apache/poi/hpsf/basic/TestWrite.java
+++ b/poi/src/test/java/org/apache/poi/hpsf/basic/TestWrite.java
@@ -92,13 +92,6 @@ class TestWrite {
"LANG environment variable to a proper value, e.g. " +
"\"de_DE\".";
- /*
- @BeforeClass
- public static void setUpClass() {
- VariantSupport.setLogUnsupportedTypes(false);
- }
- */
-
/**
* Writes an empty property set to a POIFS and reads it back in.
*
@@ -134,9 +127,7 @@ class TestWrite {
@Test
void writeEmptyPropertySet()
throws IOException, UnsupportedVariantTypeException {
- final File dataDir = _samples.getFile("");
- final File filename = new File(dataDir, POI_FS);
- filename.deleteOnExit();
+ final File filename = TempFile.createTempFile(POI_FS, ".doc");
/* Create a mutable property set and write it to a POIFS: */
try (OutputStream out = new FileOutputStream(filename);
@@ -172,9 +163,8 @@ class TestWrite {
throws IOException, UnsupportedVariantTypeException {
final String AUTHOR = "Rainer Klute";
final String TITLE = "Test Document";
- final File dataDir = _samples.getFile("");
- final File filename = new File(dataDir, POI_FS);
- filename.deleteOnExit();
+ final File filename = TempFile.createTempFile(POI_FS, ".doc");
+
try (OutputStream out = new FileOutputStream(filename);
POIFSFileSystem poiFs = new POIFSFileSystem()) {
@@ -227,9 +217,7 @@ class TestWrite {
final String SECTION2 = "Section 2";
final ClassID FORMATID = ClassIDPredefined.EXCEL_V12.getClassID();
- final File dataDir = _samples.getFile("");
- final File filename = new File(dataDir, POI_FS);
- filename.deleteOnExit();
+ final File filename = TempFile.createTempFile(POI_FS, ".doc");
try (OutputStream out = new FileOutputStream(filename);
POIFSFileSystem poiFs = new POIFSFileSystem()) {