1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 package org.w3c.tidy;
55
56 import java.io.BufferedInputStream;
57 import java.net.URL;
58
59 import org.w3c.dom.Document;
60
61
62 /***
63 * testcase for JTidy resolved bugs.
64 * @author fgiust
65 * @version $Revision: 1.23 $ ($Author: fgiust $)
66 */
67 public class JTidyBugsTest extends TidyTestCase
68 {
69
70 /***
71 * Instantiate a new Test case.
72 * @param name test name
73 */
74 public JTidyBugsTest(String name)
75 {
76 super(name);
77 }
78
79 /***
80 * test for JTidy [475643]: Hex character references not handled.
81 * @throws Exception any exception generated during the test
82 */
83 public void test475643() throws Exception
84 {
85 executeTidyTest("475643.html");
86
87
88 assertNoWarnings();
89 }
90
91 /***
92 * test for JTidy [547976]: Case of attribute values.
93 * @throws Exception any exception generated during the test
94 */
95 public void test547976() throws Exception
96 {
97 executeTidyTest("547976.html");
98 }
99
100 /***
101 * test for JTidy [508245]: Do not convert the & or < to Entity Ref. Actually is "Tidy fails in completing
102 * unclosed tags"
103 * @throws Exception any exception generated during the test
104 */
105 public void test508245() throws Exception
106 {
107 executeTidyTest("508245.html");
108 assertNoErrors();
109 }
110
111 /***
112 * test for JTidy [527118]: Suppress duplicate attributes.
113 * @throws Exception any exception generated during the test
114 */
115 public void test527118() throws Exception
116 {
117 executeTidyTest("527118.html");
118 }
119
120 /***
121 * test for JTidy [531962]: Closing quotes around attribute values.
122 * @throws Exception any exception generated during the test
123 */
124 public void test531962() throws Exception
125 {
126
127
128
129
130 executeTidyTest("531962.html");
131 }
132
133 /***
134 * test for JTidy [538727]: setDocType uncorrectly adds "".
135 * @throws Exception any exception generated during the test
136 */
137 public void test538727() throws Exception
138 {
139
140
141 executeTidyTest("538727.html");
142 }
143
144 /***
145 * test for JTidy [574158]: Error with FONT tag.
146 * @throws Exception any exception generated during the test
147 */
148 public void test574158() throws Exception
149 {
150 executeTidyTest("574158.html");
151 }
152
153 /***
154 * test for JTidy [610244]: NullPointerException in parsing.
155 * @throws Exception any exception generated during the test
156 */
157 public void test610244() throws Exception
158 {
159 executeTidyTest("610244.html");
160 }
161
162 /***
163 * test for JTidy [648768]: Fix for character references >= 32768.
164 * @throws Exception any exception generated during the test
165 */
166 public void test648768() throws Exception
167 {
168 executeTidyTest("648768.html");
169 assertNoWarnings();
170 }
171
172 /***
173 * test for JTidy [791933]: German special character converted to upper case.
174 * @throws Exception any exception generated during the test
175 */
176 public void test791933() throws Exception
177 {
178 executeTidyTest("791933.html");
179 }
180
181 /***
182 * test for JTidy [663197]: nbsp handling is wrong.
183 * @throws Exception any exception generated during the test
184 */
185 public void test663197() throws Exception
186 {
187 executeTidyTest("663197.html");
188 }
189
190 /***
191 * test for JTidy [763191]: Again DOM Parsing error (tidy removes spaces in attribute values).
192 * @throws Exception any exception generated during the test
193 */
194 public void test763191() throws Exception
195 {
196 executeTidyTest("763191.html");
197 }
198
199 /***
200 * test for JTidy [763186]: Another DOM Parsing error (tidy inserting whitespaces).
201 * @throws Exception any exception generated during the test
202 */
203 public void test763186() throws Exception
204 {
205 executeTidyTest("763186.html");
206 }
207
208 /***
209 * test for JTidy [909187]: JTidy should remove 0x0 from stream.
210 * @throws Exception any exception generated during the test
211 */
212 public void test909187() throws Exception
213 {
214 executeTidyTest("909187.html");
215 }
216
217 /***
218 * test for JTidy [917012]: Spaces are moved from content to between tags.
219 * @throws Exception any exception generated during the test
220 */
221 public void test917012() throws Exception
222 {
223 executeTidyTest("917012.html");
224 }
225
226 /***
227 * test for JTidy [922302]: Add comment to script tag to produce valid XML.
228 * @throws Exception any exception generated during the test
229 */
230 public void test922302() throws Exception
231 {
232 executeTidyTest("922302.html");
233 }
234
235 /***
236 * test for JTidy [929936]: escape URLs.
237 * @throws Exception any exception generated during the test
238 */
239 public void test929936() throws Exception
240 {
241 executeTidyTest("929936.html");
242
243 assertWarnings(10);
244 }
245
246 /***
247 * test for JTidy [943559]: Form between td. Tidy C mark this as an error, Jtidy adds a useless table.
248 * @throws Exception any exception generated during the test
249 */
250 public void test943559() throws Exception
251 {
252 executeTidyTest("943559.html");
253 }
254
255 /***
256 * test for JTidy [935796]: Quote entities converted to literals.
257 * @throws Exception any exception generated during the test
258 */
259 public void test935796() throws Exception
260 {
261 executeTidyTest("935796.html");
262 }
263
264 /***
265 * test for JTidy [1024661]: Error Parsing duplicate style.
266 * @throws Exception any exception generated during the test
267 */
268 public void test1024661() throws Exception
269 {
270 executeTidyTest("1024661.html");
271 }
272
273 /***
274 * test for JTidy [1039641]: Pre should not change the inside text.
275 * @throws Exception any exception generated during the test
276 */
277 public void test1039641() throws Exception
278 {
279 executeTidyTest("1039641.html");
280 }
281
282 /***
283 * test for JTidy [1058909]: Certain sites causing null pointer Exceptions.
284 * @throws Exception any exception generated during the test
285 */
286 public void test1058909() throws Exception
287 {
288 executeTidyTest("1058909.html");
289 }
290
291 }