aboutsummaryrefslogtreecommitdiffstats
path: root/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2013-12-27 00:22:19 +0000
committerAndreas Beeker <kiwiwings@apache.org>2013-12-27 00:22:19 +0000
commita30d2870c89f183972f1ffe30cfef1cb8d210b1f (patch)
treea63cf5991facb290b4a251df9c671d17970f4ee2 /src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
parent7f22915265669232054cb65e100cf4adec0dc7d0 (diff)
downloadpoi-a30d2870c89f183972f1ffe30cfef1cb8d210b1f.tar.gz
poi-a30d2870c89f183972f1ffe30cfef1cb8d210b1f.zip
Bug 48593 - [PATCH] Multiple Saves Causes Slide Corruption
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1553610 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java')
-rw-r--r--src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
index ff918ad03d..1398e747e1 100644
--- a/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
+++ b/src/scratchpad/testcases/org/apache/poi/hslf/TestReWrite.java
@@ -18,15 +18,16 @@
package org.apache.poi.hslf;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
+
import junit.framework.TestCase;
-import org.apache.poi.hslf.usermodel.SlideShow;
-import org.apache.poi.poifs.filesystem.*;
import org.apache.poi.POIDataSamples;
-
-import java.io.ByteArrayOutputStream;
-import java.io.ByteArrayInputStream;
-import java.io.FileNotFoundException;
+import org.apache.poi.hslf.usermodel.SlideShow;
+import org.apache.poi.poifs.filesystem.DocumentEntry;
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
/**
* Tests that HSLFSlideShow writes the powerpoint bit of data back out
@@ -160,4 +161,16 @@ public final class TestReWrite extends TestCase {
assertEquals(_oData[i], _nData[i]);
}
}
+
+ public void test48593() throws Exception {
+ SlideShow slideShow = new SlideShow();
+ slideShow.createSlide();
+ slideShow = HSLFTestDataSamples.writeOutAndReadBack(slideShow);
+ slideShow.createSlide();
+ slideShow = HSLFTestDataSamples.writeOutAndReadBack(slideShow);
+ slideShow.createSlide();
+ slideShow = HSLFTestDataSamples.writeOutAndReadBack(slideShow);
+ slideShow.createSlide();
+ slideShow = HSLFTestDataSamples.writeOutAndReadBack(slideShow);
+ }
}