From 178f95c3fd8589cfa94cf4785b591e7ab53b99fa Mon Sep 17 00:00:00 2001 From: PaulRambags Date: Thu, 26 Sep 2019 19:08:35 +0200 Subject: [PATCH 1/7] #106: Added element as child element of . --- .../formatter/test/TakenFromDP2Test.java | 10 ++++ .../resource-files/dp2/toc-text-expected.pef | 47 +++++++++++++++ .../dp2/toc-text-input-deprecated.obfl | 52 +++++++++++++++++ .../resource-files/dp2/toc-text-input.obfl | 58 +++++++++++++++++++ .../formatter/impl/obfl/OBFLWsNormalizer.java | 6 +- .../formatter/impl/obfl/ObflParserImpl.java | 21 +++++++ .../dotify/formatter/impl/obfl/ObflQName.java | 3 + 7 files changed, 195 insertions(+), 2 deletions(-) create mode 100644 integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-expected.pef create mode 100644 integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-input-deprecated.obfl create mode 100644 integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-input.obfl diff --git a/integrationtest/org/daisy/dotify/formatter/test/TakenFromDP2Test.java b/integrationtest/org/daisy/dotify/formatter/test/TakenFromDP2Test.java index 9319d2bb..526bcb05 100644 --- a/integrationtest/org/daisy/dotify/formatter/test/TakenFromDP2Test.java +++ b/integrationtest/org/daisy/dotify/formatter/test/TakenFromDP2Test.java @@ -333,4 +333,14 @@ public void testBreakBeforeSheet() throws LayoutEngineException, IOException, Pa testPEF("resource-files/dp2/break-before-sheet-input.obfl", "resource-files/dp2/break-before-sheet-expected.pef", false); } + @Test + public void testTocTextDeprecated() throws LayoutEngineException, IOException, PagedMediaWriterConfigurationException { + testPEF("resource-files/dp2/toc-text-input-deprecated.obfl", + "resource-files/dp2/toc-text-expected.pef", true); + } + @Test + public void testTocText() throws LayoutEngineException, IOException, PagedMediaWriterConfigurationException { + testPEF("resource-files/dp2/toc-text-input.obfl", + "resource-files/dp2/toc-text-expected.pef", true); + } } diff --git a/integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-expected.pef b/integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-expected.pef new file mode 100644 index 00000000..4ebc251a --- /dev/null +++ b/integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-expected.pef @@ -0,0 +1,47 @@ + + + + + toc-text + Tests toc-text. + application/x-pef+xml + + + + +
+ + ⠼⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠼⠃ + ⠿⠿⠿⠿⠀⠼⠚⠀⠼⠁ + ⠿⠿ + ⠿⠿⠀⠀⠀⠀⠀⠼⠃ + ⠿⠿⠿⠿ + +
+
+ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠿⠿ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + + + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠿⠿ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + + + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + ⠿⠿⠿ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + ⠤⠤⠤⠤⠤⠀⠤⠤⠤⠤⠤ + +
+
+ +
\ No newline at end of file diff --git a/integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-input-deprecated.obfl b/integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-input-deprecated.obfl new file mode 100644 index 00000000..fa34e2a7 --- /dev/null +++ b/integrationtest/org/daisy/dotify/formatter/test/resource-files/dp2/toc-text-input-deprecated.obfl @@ -0,0 +1,52 @@ + + + + toc-text-input-deprecated + Tests toc-entry elements without a toc-text child element (deprecated, #106). + + + +
+ + + + + + +
+