@@ -46,6 +46,7 @@ This file is part of the iText (R) project.
46
46
import com .itextpdf .forms .PdfAcroForm ;
47
47
import com .itextpdf .html2pdf .ConverterProperties ;
48
48
import com .itextpdf .html2pdf .HtmlConverter ;
49
+ import com .itextpdf .kernel .PdfException ;
49
50
import com .itextpdf .kernel .pdf .PdfDocument ;
50
51
import com .itextpdf .kernel .pdf .PdfReader ;
51
52
import com .itextpdf .kernel .pdf .PdfWriter ;
@@ -55,8 +56,10 @@ This file is part of the iText (R) project.
55
56
import org .junit .Assert ;
56
57
import org .junit .BeforeClass ;
57
58
import org .junit .Ignore ;
59
+ import org .junit .Rule ;
58
60
import org .junit .Test ;
59
61
import org .junit .experimental .categories .Category ;
62
+ import org .junit .rules .ExpectedException ;
60
63
61
64
import java .io .FileInputStream ;
62
65
import java .io .IOException ;
@@ -73,6 +76,9 @@ public static void beforeClass() {
73
76
createDestinationFolder (destinationFolder );
74
77
}
75
78
79
+ @ Rule
80
+ public ExpectedException junitExpectedException = ExpectedException .none ();
81
+
76
82
@ Test
77
83
public void simpleTextFieldTagged () throws IOException , InterruptedException {
78
84
runTest ("simpleTextFieldTagged" );
@@ -124,13 +130,22 @@ public void simpleRadioFormTagged() throws IOException, InterruptedException {
124
130
125
131
@ Test
126
132
@ Ignore ("DEVSIX-980. DefaultHtmlProcessor ERROR No worker found for tag datalist" )
127
- public void datalistFormTagged () throws IOException , InterruptedException {
128
- runTest ("datalistFormTagged" );
133
+ public void dataListFormTagged () throws IOException , InterruptedException {
134
+ runTest ("dataListFormTagged" );
135
+ }
136
+
137
+ @ Test
138
+ public void fieldSetFormTagged () throws IOException , InterruptedException {
139
+ runTest ("fieldSetFormTagged" );
129
140
}
130
141
131
142
@ Test
132
- public void fieldsetFormTagged () throws IOException , InterruptedException {
133
- runTest ("fieldsetFormTagged" );
143
+ // TODO DEVSIX-4601
144
+ // exception is thrown on "convert tagged PDF with acroform" stage
145
+ public void inputFormPrematureFlush () throws IOException , InterruptedException {
146
+ junitExpectedException .expect (PdfException .class );
147
+ junitExpectedException .expectMessage (PdfException .TagStructureFlushingFailedItMightBeCorrupted );
148
+ runTest ("inputFormPrematureFlush" );
134
149
}
135
150
136
151
private void runTest (String name ) throws IOException , InterruptedException {
0 commit comments