Skip to content

Commit 2249c87

Browse files
committed
Add new ignored tab test.
DEVSIX-1280
1 parent ccf4dc1 commit 2249c87

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

layout/src/test/java/com/itextpdf/layout/TabsTest.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ This file is part of the iText (R) project.
6060
import com.itextpdf.test.annotations.type.IntegrationTest;
6161
import org.junit.Assert;
6262
import org.junit.BeforeClass;
63+
import org.junit.Ignore;
6364
import org.junit.Test;
6465
import org.junit.experimental.categories.Category;
6566

@@ -305,6 +306,32 @@ public void outOfPageBoundsTest() throws IOException, InterruptedException {
305306
Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, destinationFolder, "diff"));
306307
}
307308

309+
@Ignore("1280")
310+
@Test
311+
public void tabsInParagraphTest01() throws IOException, InterruptedException {
312+
String outFileName = destinationFolder + "tabsInParagraphTest01.pdf";
313+
String cmpFileName = sourceFolder + "cmp_tabsInParagraphTest01.pdf";
314+
315+
PdfDocument pdfDoc = new PdfDocument(new PdfWriter(outFileName));
316+
Document doc = new Document(pdfDoc);
317+
318+
float tabWidth = pdfDoc.getDefaultPageSize().getWidth() - doc.getLeftMargin() - doc.getRightMargin();
319+
320+
Paragraph p = new Paragraph();
321+
p
322+
.addTabStops(
323+
new TabStop(tabWidth, TabAlignment.RIGHT))
324+
.add("There is a tab after me. And then two texts.")
325+
.add(new Tab())
326+
.add("Text1")
327+
.add("Text2");
328+
329+
doc.add(p);
330+
331+
doc.close();
332+
Assert.assertNull(new CompareTool().compareByContent(outFileName, cmpFileName, destinationFolder, "diff"));
333+
}
334+
308335
private Document initDocument(String outFileName) throws FileNotFoundException {
309336
PdfDocument pdfDoc = new PdfDocument(new PdfWriter(outFileName));
310337
pdfDoc.setDefaultPageSize(PageSize.A4.rotate());

0 commit comments

Comments
 (0)