From 4e1ca75a4acbc0442e25127432c42f4144b8a17b Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Sun, 21 Nov 2021 15:51:37 +0100 Subject: [PATCH] Regression test added --- .../regressionTests/html5/ListAfterText.java | 31 +++++++++++++ testdocuments/input/list_after_spb.odt | Bin 0 -> 13165 bytes testdocuments/model/list_after_spb.html | 43 ++++++++++++++++++ 3 files changed, 74 insertions(+) create mode 100644 src/r_tests/java/w2phtml/regressionTests/html5/ListAfterText.java create mode 100644 testdocuments/input/list_after_spb.odt create mode 100644 testdocuments/model/list_after_spb.html diff --git a/src/r_tests/java/w2phtml/regressionTests/html5/ListAfterText.java b/src/r_tests/java/w2phtml/regressionTests/html5/ListAfterText.java new file mode 100644 index 0000000..d470e25 --- /dev/null +++ b/src/r_tests/java/w2phtml/regressionTests/html5/ListAfterText.java @@ -0,0 +1,31 @@ +package w2phtml.regressionTests.html5; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.io.FileUtils; +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + +public class ListAfterText { + @Test + @DisplayName("List after soft page break") + void testExample() throws Exception { + String name = "list_after_spb"; + File input = new File("./testdocuments/input/" + name + ".odt"); + assertTrue(input.exists()); + List arguments = new ArrayList(); + arguments.add("-page_break_style"); + arguments.add("height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"); + arguments.add("-html5"); + arguments.add("./testdocuments/input/" + name + ".odt"); + arguments.add("./testdocuments/output/" + name + ".html"); + w2phtml.Application.main(arguments.toArray(new String[0])); + File result = new File("./testdocuments/output/" + name + ".html"); + File model = new File("./testdocuments/model/" + name + ".html"); + assertTrue(FileUtils.contentEquals(result, model), "The files differ!"); + } +} diff --git a/testdocuments/input/list_after_spb.odt b/testdocuments/input/list_after_spb.odt new file mode 100644 index 0000000000000000000000000000000000000000..f690e5ea08e91869cef226d2b52ed86f796fa783 GIT binary patch literal 13165 zcmc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!!|{_(QG3X=&KcY6w*cdjd7EVaPC6vWCi3-2@wBF50vi6=~4}h^V%>E9uQ{ zo{I7C=sx0SZm19Wy_-)`Jcg|JJZ5znHSf1CC^UYxV_Jj zCmOtbuQ^G#f3)p{@E0UJE4f^}`qh4M<5d7SNC=347xna?=N{NE&Y7IJsxX7JyadyK zH{^?(RvHhm>mo%DzUB$)sb#&WC{#S4r@e&Pg+w4Gq`*Uurf&7FzB`zr z2Gp{-t}071it|Ex<6ZV_S(Pj`xVy9Ht}`>Gh+~#Y1s$TIf!7j){pfr~k_E(Lz+HB1 zg22*K^a(@Kapmtsd({2kPiVE?!X>FN1o3x5ZxXVHGna@SM9&c`T3~9WgiMdBG6tG*-eg8)v&eAqZ6n?n}p)YelMF8Z>H1MBSuD{%fzu2Ga*#AWR=~(|& zxBn%S|2Dao?C%BZ|Bm~sI{!=6|82@>|Elr-iTo$^{x>rB1^G`}{=c*QMnORQQel4^ z`HRN=@3QLu&}9F$>3)O%YeB*9eS^Ot`>oObZ&?!lhUK?r`_C-Dw8`H#_%|$n)o}lr z=a&}y+n_Q3X9NAKru)BT68IaYf7N*Zndz7M{oCCBhUvHF`_C-@+Crs&!}3=R_$fGn^yk0CxBeaY z*Z0`JK6&*oOJ)A*_x(HauOs-sA}{D(F7z*Ny?;mkb=>(i!v8jQhJP6E6#=ktzlyzn O`DDHfSM`j)_Wlp5w{y(^ literal 0 HcmV?d00001 diff --git a/testdocuments/model/list_after_spb.html b/testdocuments/model/list_after_spb.html new file mode 100644 index 0000000..3662db1 --- /dev/null +++ b/testdocuments/model/list_after_spb.html @@ -0,0 +1,43 @@ + + + + Default + + + + +
+
+

text0

+
+
+
+
+
+
    +
  • +

    list1

    +
  • +
+
+
+
+
+
+
    +
  • +

    list2

    +
  • +
+
+
+
+
+
+

text4

+
+
+ +