aboutsummaryrefslogtreecommitdiffstats
path: root/poi-scratchpad/src/test
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-08-28 14:16:01 +0000
committerPJ Fanning <fanningpj@apache.org>2022-08-28 14:16:01 +0000
commit913d1eecf52382f706d5903b2fbd0ae9c8770494 (patch)
tree5315db4ecafbb785de58796ab75ed33433377de8 /poi-scratchpad/src/test
parent25f00ba7c2db9bd897cffa67d12b1cfa31583516 (diff)
downloadpoi-913d1eecf52382f706d5903b2fbd0ae9c8770494.tar.gz
poi-913d1eecf52382f706d5903b2fbd0ae9c8770494.zip
[bug-63576] support capitalized text in WordExtractor (HWPF)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-scratchpad/src/test')
-rw-r--r--poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java
index 2e67e0ff03..4ef67c44c8 100644
--- a/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java
+++ b/poi-scratchpad/src/test/java/org/apache/poi/hwpf/extractor/TestWordExtractor.java
@@ -402,6 +402,14 @@ public final class TestWordExtractor {
}
}
+ @Test
+ void testCapitalized() throws Exception {
+ try (WordExtractor wExt = openExtractor("capitalized.doc")) {
+ String text = wExt.getText().trim();
+ assertEquals("The following word is: CAPITALIZED.", text);
+ }
+ }
+
private WordExtractor openExtractor(String fileName) throws IOException {
try (InputStream is = docTests.openResourceAsStream(fileName)) {
return new WordExtractor(is);