Added test list in table

This commit is contained in:
Georgy Litvinov 2021-03-12 18:53:27 +01:00
parent 4ecae8efcb
commit 89f2807f4e
4 changed files with 77 additions and 0 deletions

View file

@ -0,0 +1,29 @@
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 ListTableSection {
@Test
@DisplayName("list in table in section")
void testExample() throws Exception {
String testName = "list_in_table_in_section";
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/" + testName + ".odt");
arguments.add("./testdocuments/output/" + testName + ".html");
w2phtml.Application.main(arguments.toArray(new String[0]));
File result = new File("./testdocuments/output/" + testName + ".html");
File model = new File("./testdocuments/model/" + testName + ".html");
assertTrue(FileUtils.contentEquals(result, model), "The files differ!");
}
}

Binary file not shown.

View file

@ -0,0 +1,48 @@
<!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;">
<table id="1table" style="border-spacing:0;table-layout:fixed;width:100%;margin-top:0;margin-bottom:0;border-collapse:separate;">
<colgroup>
<col style="width:100.0%" />
</colgroup>
<tbody>
<tr>
<td style="border:0.004166667rem solid #000000;padding:0.11574804rem;vertical-align:top;"><ul style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;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:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span style="font-size:3.3333335rem;font-family:&apos;IPH Astra Serif&apos;,serif;">text tex1 </span></p></li></ul></td>
</tr>
</tbody>
</table>
</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;">
<table id="1table" style="border-spacing:0;table-layout:fixed;width:100%;margin-top:0;margin-bottom:0;border-collapse:separate;">
<colgroup>
<col style="width:100.0%" />
</colgroup>
<tbody>
<tr>
<td style="border:0.004166667rem solid #000000;padding:0.11574804rem;vertical-align:top;">
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"><span style="font-size:3.3333335rem;font-family:&apos;IPH Astra Serif&apos;,serif;">2ext text</span></p>
</td>
</tr>
</tbody>
</table>
<ul start="2" style="list-style-type:disc;clear:left;margin-top:0;font-family:OpenSymbol;margin-bottom:0;">
<li style="list-style-type:none">
<p class="Textbody" style="margin-left:0;border:none;padding:0;text-indent:2.1259842rem;font-size:1.0rem;margin-top:0;font-family:&apos;IPH Astra Serif&apos;,serif;margin-bottom:0.58346456rem;margin-right:0;"> </p>
</li>
</ul>
</div>
</div>
</body>
</html>