Skip to content

Commit

Permalink
Add an item to verify that slideshows can be opened
Browse files Browse the repository at this point in the history
This verifies that the issue in #103 cannot be reproduced
  • Loading branch information
centic9 committed Dec 23, 2023
1 parent 1f39c13 commit 920aa69
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ private void setupContent() throws IOException {
StringBuilder text = new StringBuilder();
for (int resource : new int[] {
R.raw.simple,
R.raw.sample2,
R.raw.sample,
R.raw.lorem_ipsum,
} ) {
Expand All @@ -292,6 +293,15 @@ private void setupContent() throws IOException {
return "Issue 98 - Had text: " + text;
}));

// reproducer for https://github.com/centic9/poi-on-android/issues/103
DummyContent.addItem(new DummyItemWithCode("c" + (idCount++), "Test Issue 103", () -> {
try (InputStream inputStream = getResources().openRawResource(R.raw.sample);
XMLSlideShow slideShow = new XMLSlideShow(inputStream)) {

return "Issue 103 - XMLSlideShow constructed successfully: " + slideShow.getSlides().size();
}
}));

try (InputStream docFile = getResources().openRawResource(R.raw.lorem_ipsum)) {
XWPFDocument doc = new XWPFDocument(docFile);
try {
Expand Down

0 comments on commit 920aa69

Please sign in to comment.