Skip to content

Commit c282efe

Browse files
LodrKumquatiText-CI
authored andcommitted
Add test on bug in wordWasSplitAndItWillFitOntoNextLine
DEVSIX-4622 Autoported commit. Original commit hash: [60f403123]
1 parent 0bcc19c commit c282efe

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

itext.tests/itext.layout.tests/itext/layout/ParagraphTest.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ source product.
4848
using iText.Layout.Element;
4949
using iText.Layout.Properties;
5050
using iText.Test;
51+
using iText.Test.Attributes;
5152

5253
namespace iText.Layout {
5354
public class ParagraphTest : ExtendedITextTest {
@@ -111,5 +112,23 @@ public virtual void WordWasSplitAndItWillFitOntoNextLineTest01() {
111112
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
112113
, "diff"));
113114
}
115+
116+
[NUnit.Framework.Test]
117+
[LogMessage(iText.IO.LogMessageConstant.RECTANGLE_HAS_NEGATIVE_OR_ZERO_SIZES, LogLevel = LogLevelConstants
118+
.INFO)]
119+
public virtual void WordWasSplitAndItWillFitOntoNextLineTest02() {
120+
// TODO DEVSIX-4622
121+
String outFileName = destinationFolder + "wordWasSplitAndItWillFitOntoNextLineTest02.pdf";
122+
String cmpFileName = sourceFolder + "cmp_wordWasSplitAndItWillFitOntoNextLineTest02.pdf";
123+
PdfDocument pdfDocument = new PdfDocument(new PdfWriter(outFileName));
124+
Document document = new Document(pdfDocument);
125+
Paragraph paragraph = new Paragraph().Add(new Text("Short").SetBackgroundColor(ColorConstants.YELLOW)).Add
126+
(new Text(" Loooooooooooooooooooong").SetBackgroundColor(ColorConstants.RED)).SetWidth(90).SetBorder(new
127+
SolidBorder(1));
128+
document.Add(paragraph);
129+
document.Close();
130+
NUnit.Framework.Assert.IsNull(new CompareTool().CompareByContent(outFileName, cmpFileName, destinationFolder
131+
, "diff"));
132+
}
114133
}
115134
}

port-hash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8a3a77ae6b0da4d9264f88d0d19206b35d7a5813
1+
60f40312351df46d2f32fc196bfd3da9e8be748f

0 commit comments

Comments
 (0)