This is an automated email from the ASF dual-hosted git repository. kwin pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-doxia.git
The following commit(s) were added to refs/heads/master by this push: new 65fead6b Add test for parsing font styles including escape characters (#144) 65fead6b is described below commit 65fead6b02c5daea894670825123d2d1ed7c6958 Author: Konrad Windszus <k...@apache.org> AuthorDate: Sun Feb 12 10:54:38 2023 +0100 Add test for parsing font styles including escape characters (#144) --- .../apache/maven/doxia/module/apt/AptParserTest.java | 17 +++++++++++++++++ .../doxia-module-apt/src/test/resources/test/font.apt | 1 + 2 files changed, 18 insertions(+) diff --git a/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java b/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java index 9420f044..afd833ae 100644 --- a/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java +++ b/doxia-modules/doxia-module-apt/src/test/java/org/apache/maven/doxia/module/apt/AptParserTest.java @@ -124,6 +124,23 @@ public class AptParserTest extends AbstractParserTest { "body_"); } + @Test + public void testFontStyles() throws Exception { + SinkEventTestingSink sink = new SinkEventTestingSink(); + try (Reader reader = getTestReader("test/font")) { + createParser().parse(reader, sink); + } + + Iterator<SinkEventElement> it = sink.getEventList().iterator(); + + assertSinkStartsWith(it, "head", "head_", "body", "paragraph", "text", "italic"); + assertSinkEquals(it.next(), "text", "<Italic>"); + assertSinkStartsWith(it, "italic_", "text", "bold"); + assertSinkEquals(it.next(), "text", "<Bold>"); + assertSinkStartsWith(it, "bold_", "text", "monospaced"); + assertSinkEquals(it.next(), "text", "<Monospaced>"); + } + @Test public void testSnippetTrailingSpace() throws Exception { // DOXIA-425 diff --git a/doxia-modules/doxia-module-apt/src/test/resources/test/font.apt b/doxia-modules/doxia-module-apt/src/test/resources/test/font.apt new file mode 100644 index 00000000..c1b89631 --- /dev/null +++ b/doxia-modules/doxia-module-apt/src/test/resources/test/font.apt @@ -0,0 +1 @@ + Paragraph with <\<Italic\>>, <<\<Bold\>>>, <<<\<Monospaced\>>>> font