From 153821e443fec655815944b72a2ca49d1591ef0d Mon Sep 17 00:00:00 2001 From: Tim Allison Date: Tue, 20 Jun 2017 18:11:34 +0000 Subject: bug 61045 -- allow for (and log!) extra bytes in FormatRecord. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1799360 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/hssf/extractor/TestExcelExtractor.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/testcases/org/apache/poi') diff --git a/src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java b/src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java index 2953a5b1ac..1a67ec53a7 100644 --- a/src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java +++ b/src/testcases/org/apache/poi/hssf/extractor/TestExcelExtractor.java @@ -17,11 +17,11 @@ package org.apache.poi.hssf.extractor; +import static org.apache.poi.POITestCase.assertContains; +import static org.apache.poi.POITestCase.assertStartsWith; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; -import static org.apache.poi.POITestCase.assertContains; -import static org.apache.poi.POITestCase.assertStartsWith; import java.io.File; import java.io.IOException; @@ -388,4 +388,13 @@ public final class TestExcelExtractor { assertNotNull(extractor.getText()); extractor.close(); } + + @Test + public void test61045() throws IOException { + //bug 61045. File is govdocs1 626534 + ExcelExtractor extractor = createExtractor("61045_govdocs1_626534.xls"); + String txt = extractor.getText(); + assertContains(txt, "NONBUSINESS"); + } + } -- cgit v1.2.3