Regression test added
This commit is contained in:
parent
2b1c69e85e
commit
4e1ca75a4a
3 changed files with 74 additions and 0 deletions
|
@ -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<String> arguments = new ArrayList<String>();
|
||||
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!");
|
||||
}
|
||||
}
|
BIN
testdocuments/input/list_after_spb.odt
Normal file
BIN
testdocuments/input/list_after_spb.odt
Normal file
Binary file not shown.
43
testdocuments/model/list_after_spb.html
Normal file
43
testdocuments/model/list_after_spb.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="ru-RU" xml:lang="ru-RU" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Default</title>
|
||||
<meta charset="UTF-8" />
|
||||
<style media="all" type="text/css">
|
||||
body {margin-left:auto;max-width:800px;font-size:1.0rem;font-family:'IPH Lib Serif';margin-right:auto;}
|
||||
</style>
|
||||
</head>
|
||||
<body dir="ltr">
|
||||
<div class="pageNum" page="1">
|
||||
<div class="pageContainer" style="column-count: 1;">
|
||||
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:'IPH Astra Serif',serif;margin-bottom:0.58346456rem;margin-right:0;">text0</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
|
||||
<div class="pageNum" page="2">
|
||||
<div class="pageContainer" style="column-count: 1;">
|
||||
<ul class="listlevel1List2" style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:'IPH Astra Serif',serif;margin-bottom:0;">
|
||||
<li>
|
||||
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:'IPH Astra Serif',serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber">– </span>list1</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
|
||||
<div class="pageNum" page="3">
|
||||
<div class="pageContainer" style="column-count: 1;">
|
||||
<ul class="listlevel1List2" style="margin-left:0;list-style-type:none;padding-left:0;clear:left;margin-top:0;font-family:'IPH Astra Serif',serif;margin-bottom:0;">
|
||||
<li>
|
||||
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:'IPH Astra Serif',serif;margin-bottom:0.58346456rem;margin-right:0;"><span class="ItemNumber">– </span>list2</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pageBreak" style="height:3em;margin-top:1em;margin-bottom:1em;background-color:red;"> </div>
|
||||
<div class="pageNum" page="4">
|
||||
<div class="pageContainer" style="column-count: 1;">
|
||||
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:'IPH Astra Serif',serif;margin-bottom:0.58346456rem;margin-right:0;">text4</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Reference in a new issue