diff options
Diffstat (limited to 'src/test/java')
| -rw-r--r-- | src/test/java/org/zwobble/mammoth/tests/styles/ParagraphMatcherTests.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/java/org/zwobble/mammoth/tests/styles/ParagraphMatcherTests.java b/src/test/java/org/zwobble/mammoth/tests/styles/ParagraphMatcherTests.java index 8c75369..fdaa075 100644 --- a/src/test/java/org/zwobble/mammoth/tests/styles/ParagraphMatcherTests.java +++ b/src/test/java/org/zwobble/mammoth/tests/styles/ParagraphMatcherTests.java @@ -60,4 +60,14 @@ public class ParagraphMatcherTests { with(STYLE, Optional.of(new Style("Heading 1", Optional.of("Heading 1")))))); assertFalse(matcher.matches(paragraphWithIncorrectStyleName)); } + + @Test + public void styleNamesAreCaseInsensitive() { + ParagraphMatcher matcher = ParagraphMatcher.styleName("tips paragraph"); + assertFalse(matcher.matches(make(a(PARAGRAPH)))); + + Paragraph paragraphWithCorrectStyleName = make(a(PARAGRAPH, + with(STYLE, Optional.of(new Style("TipsParagraph", Optional.of("Tips Paragraph")))))); + assertTrue(matcher.matches(paragraphWithCorrectStyleName)); + } } |
