]> source.dussan.org Git - poi.git/commitdiff
Add a unit test to show that bug #49648 no longer occurs
authorNick Burch <nick@apache.org>
Fri, 24 Jun 2011 11:18:49 +0000 (11:18 +0000)
committerNick Burch <nick@apache.org>
Fri, 24 Jun 2011 11:18:49 +0000 (11:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1139245 13f79535-47bb-0310-9956-ffa450edef68

src/scratchpad/testcases/org/apache/poi/hslf/usermodel/TestBugs.java
test-data/slideshow/49648.ppt [new file with mode: 0644]

index 122c72c96010fa82abb1f5dafe3b44a643578b54..088e0bcaefb1d0b1015e0058296bd540043322b6 100644 (file)
@@ -392,4 +392,18 @@ public final class TestBugs extends TestCase {
                // Good
         }
     }
+    
+    /**
+     * Changing text from Ascii to Unicode
+     */
+    public void test49648() throws Exception {
+       SlideShow ppt = new SlideShow(_slTests.openResourceAsStream("49648.ppt"));
+       for(Slide slide : ppt.getSlides()) {
+          for(TextRun run : slide.getTextRuns()) {
+             String text = run.getRawText();
+             text.replace("{txtTot}", "With \u0123\u1234\u5678 unicode");
+             run.setRawText(text);
+          }
+       }
+    }
 }
diff --git a/test-data/slideshow/49648.ppt b/test-data/slideshow/49648.ppt
new file mode 100644 (file)
index 0000000..841b904
Binary files /dev/null and b/test-data/slideshow/49648.ppt differ