Skip to content

Commit 16ea81e

Browse files
committed
Add a new white-space test.
DEVSIX-1896
1 parent abdfe4e commit 16ea81e

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

src/test/java/com/itextpdf/html2pdf/css/TextPropertiesTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ public void whiteSpaceTest02() throws IOException, InterruptedException {
121121
convertToPdfAndCompare("whiteSpaceTest02", sourceFolder, destinationFolder);
122122
}
123123

124+
@Test
125+
// TODO DEVSIX-1896
126+
public void whiteSpaceTest03() throws IOException, InterruptedException {
127+
convertToPdfAndCompare("whiteSpaceTest03", sourceFolder, destinationFolder);
128+
}
129+
124130
@Test
125131
public void enspEmspThinspTest01() throws IOException, InterruptedException {
126132
convertToPdfAndCompare("enspEmspThinspTest01", sourceFolder, destinationFolder);
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<html>
2+
<body>
3+
4+
<div style="white-space: normal; width: 50px; background-color: red;"><p>&nbsp;Test: 1 nbsp</p><p>&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 1 nbsp, 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;Test: 1 nbsp and 10 spaces</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test: 10 nbsp</p></div>
5+
6+
<div style="white-space: nowrap; width: 50px; background-color: red;"><p>&nbsp;Test: 1 nbsp</p><p>&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 1 nbsp, 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;Test: 1 nbsp and 10 spaces</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test: 10 nbsp</p></div>
7+
8+
<div style="white-space: pre; width: 50px; background-color: red;"><p>&nbsp;Test: 1 nbsp</p><p>&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 1 nbsp, 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;Test: 1 nbsp and 10 spaces</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test: 10 nbsp</p></div>
9+
10+
<div style="white-space: pre-wrap; width: 50px; background-color: red;"><p>&nbsp;Test: 1 nbsp</p><p>&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 1 nbsp, 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;Test: 1 nbsp and 10 spaces</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test: 10 nbsp</p></div>
11+
12+
<div style="white-space: pre-line; width: 50px; background-color: red;"><p>&nbsp;Test: 1 nbsp</p><p>&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&nbsp;Test: 1 nbsp, 10 spaces and 1 nbsp</p><p>&nbsp;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;&#x20;Test: 1 nbsp and 10 spaces</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test: 10 nbsp</p></div>
13+
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)