/[suikacvs]/markup/html/whatpm/t/tokenizer/test3.test
Suika

Contents of /markup/html/whatpm/t/tokenizer/test3.test

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon Jul 16 07:03:09 2007 UTC (17 years, 3 months ago) by wakaba
Branch: MAIN
++ whatpm/t/ChangeLog	16 Jul 2007 07:03:04 -0000
	* HTML-tokenizer.t: It now requires newer version
	of JSON.pm due to the broken handling for utf8 string
	of older version.  Test data files |test3.test|
	and |test4.test| are added.  Convert surrogate
	pair |\u| escapes in JSON file before it is input
	into JSON.pm parser since it does not decode
	them correctly.  U+000D convertion was incorrect.

	* HTML-tree.t: Support for new format for fragment
	parsing tests.

	* Makefile (tokenizer-files): New test
	data files |test3.test| and |test4.test| are added.

	* tokenizer-test-1.test: Test data for bare |hcro| and
	entity references in attribute values are added.

	* tokenizer-test-2.dat: Test data for U+000D are added.

2007-07-16  Wakaba  <wakaba@suika.fam.cx>

++ whatpm/Whatpm/ChangeLog	16 Jul 2007 06:56:42 -0000
	* HTML.pm.src: The character immediately following
	a bare |hcro| was discarded.  Fix handling of
	entity references in attribute values.

2007-07-16  Wakaba  <wakaba@suika.fam.cx>

1 wakaba 1.1 {"tests": [
2    
3     {"description":"<",
4     "input":"<",
5     "output":["ParseError", ["Character", "<"]]},
6    
7     {"description":"<>",
8     "input":"<>",
9     "output":["ParseError", ["Character", "<>"]]},
10    
11     {"description":"<!",
12     "input":"<!",
13     "output":["ParseError", ["Comment", ""]]},
14    
15     {"description":"<!>",
16     "input":"<!>",
17     "output":["ParseError", ["Comment", ""]]},
18    
19     {"description":"<!--",
20     "input":"<!--",
21     "output":["ParseError", ["Comment", ""]]},
22    
23     {"description":"<!-->",
24     "input":"<!-->",
25     "output":["ParseError", ["Comment", ""]]},
26    
27     {"description":"<!---",
28     "input":"<!---",
29     "output":["ParseError", ["Comment", ""]]},
30    
31     {"description":"<!--->",
32     "input":"<!--->",
33     "output":["ParseError", ["Comment", ""]]},
34    
35     {"description":"<!---->",
36     "input":"<!---->",
37     "output":[["Comment", ""]]},
38    
39     {"description":"<!-----",
40     "input":"<!-----",
41     "output":["ParseError", "ParseError", ["Comment", "-"]]},
42    
43     {"description":"<!----.",
44     "input":"<!----.",
45     "output":["ParseError", "ParseError", ["Comment", "--."]]},
46    
47     {"description":"<!---?",
48     "input":"<!---?",
49     "output":["ParseError", ["Comment", "-?"]]},
50    
51     {"description":"<!--?-",
52     "input":"<!--?-",
53     "output":["ParseError", ["Comment", "?"]]},
54    
55     {"description":"<!--?--",
56     "input":"<!--?--",
57     "output":["ParseError", ["Comment", "?"]]},
58    
59     {"description":"<!--?-.",
60     "input":"<!--?-.",
61     "output":["ParseError", ["Comment", "?-."]]},
62    
63     {"description":"<!--?.",
64     "input":"<!--?.",
65     "output":["ParseError", ["Comment", "?."]]},
66    
67     {"description":"<?>",
68     "input":"<?>",
69     "output":["ParseError", ["Comment", "?"]]},
70    
71     {"description":"<??",
72     "input":"<??",
73     "output":["ParseError", ["Comment", "??"]]},
74    
75     {"description":"</",
76     "input":"</",
77     "output":["ParseError", ["Character", "</"]]},
78    
79     {"description":"</>",
80     "input":"</>",
81     "output":["ParseError"]},
82    
83     {"description":"</?",
84     "input":"</?",
85     "output":["ParseError", ["Comment", "?"]]},
86    
87     {"description":">",
88     "input":">",
89     "output":[["Character", ">"]]},
90    
91     {"description":"-",
92     "input":"-",
93     "output":[["Character", "-"]]},
94    
95     {"description":"?",
96     "input":"?",
97     "output":[["Character", "?"]]},
98    
99     {"description":"&",
100     "input":"&",
101     "output":[["Character", "&"]]},
102    
103     {"description":"&#",
104     "input":"&#",
105     "output":["ParseError", ["Character", "&#"]]},
106    
107     {"description":"&#9",
108     "input":"&#9",
109     "output":["ParseError", ["Character", "\t"]]},
110    
111     {"description":"<!doctype >",
112     "input":"<!doctype >",
113     "output":["ParseError", ["DOCTYPE", "", null, null, false]]},
114    
115     {"description":"<!doctype ",
116     "input":"<!doctype ",
117     "output":["ParseError", ["DOCTYPE", "", null, null, false]]},
118    
119     {"description":"<!doctype!>",
120     "input":"<!doctype!>",
121     "output":["ParseError", ["DOCTYPE", "!", null, null, true]]},
122    
123     {"description":"<!doctype! >",
124     "input":"<!doctype! >",
125     "output":["ParseError", ["DOCTYPE", "!", null, null, true]]},
126    
127     {"description":"<!doctype! ",
128     "input":"<!doctype! ",
129     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
130    
131     {"description":"<!doctype! ?>",
132     "input":"<!doctype! ?>",
133     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
134    
135     {"description":"<!doctype! ??",
136     "input":"<!doctype! ??",
137     "output":["ParseError", "ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
138    
139     {"description":"<!doctype!?",
140     "input":"<!doctype!?",
141     "output":["ParseError", "ParseError", ["DOCTYPE", "!?", null, null, false]]},
142    
143     {"description":"<!doctype! public>",
144     "input":"<!doctype! public>",
145     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
146    
147     {"description":"<!doctype! public ",
148     "input":"<!doctype! public ",
149     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
150    
151     {"description":"<!doctype! public?",
152     "input":"<!doctype! public?",
153     "output":["ParseError", "ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
154    
155     {"description":"<!doctype! public''",
156     "input":"<!doctype! public''",
157     "output":["ParseError", "ParseError", ["DOCTYPE", "!", "", null, false]]},
158    
159     {"description":"<!doctype! public'(",
160     "input":"<!doctype! public'(",
161     "output":["ParseError", "ParseError", ["DOCTYPE", "!", "(", null, false]]},
162    
163     {"description":"<!doctype! public\"\">",
164     "input":"<!doctype! public\"\">",
165     "output":["ParseError", ["DOCTYPE", "!", "", null, true]]},
166    
167     {"description":"<!doctype! public\"\" ",
168     "input":"<!doctype! public\"\" ",
169     "output":["ParseError", "ParseError", ["DOCTYPE", "!", "", null, false]]},
170    
171     {"description":"<!doctype! public\"\"?",
172     "input":"<!doctype! public\"\"?",
173     "output":["ParseError", "ParseError", "ParseError", ["DOCTYPE", "!", "", null, false]]},
174    
175     {"description":"<!doctype! public\"\"'",
176     "input":"<!doctype! public\"\"'",
177     "output":["ParseError", "ParseError", ["DOCTYPE", "!", "", "", false]]},
178    
179     {"description":"<!doctype! public\"\"\"",
180     "input":"<!doctype! public\"\"\"",
181     "output":["ParseError", "ParseError", ["DOCTYPE", "!", "", "", false]]},
182    
183     {"description":"<!doctype! public\"#",
184     "input":"<!doctype! public\"#",
185     "output":["ParseError", "ParseError", ["DOCTYPE", "!", "#", null, false]]},
186    
187     {"description":"<!doctype! system>",
188     "input":"<!doctype! system>",
189     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
190    
191     {"description":"<!doctype! system ",
192     "input":"<!doctype! system ",
193     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
194    
195     {"description":"<!doctype! system?",
196     "input":"<!doctype! system?",
197     "output":["ParseError", "ParseError", "ParseError", ["DOCTYPE", "!", null, null, false]]},
198    
199     {"description":"<!doctype! system''",
200     "input":"<!doctype! system''",
201     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, "", false]]},
202    
203     {"description":"<!doctype! system'(",
204     "input":"<!doctype! system'(",
205     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, "(", false]]},
206    
207     {"description":"<!doctype! system\"\">",
208     "input":"<!doctype! system\"\">",
209     "output":["ParseError", ["DOCTYPE", "!", null, "", true]]},
210    
211     {"description":"<!doctype! system\"\" ",
212     "input":"<!doctype! system\"\" ",
213     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, "", false]]},
214    
215     {"description":"<!doctype! system\"\"?",
216     "input":"<!doctype! system\"\"?",
217     "output":["ParseError", "ParseError", "ParseError", ["DOCTYPE", "!", null, "", false]]},
218    
219     {"description":"<!doctype! system\"#",
220     "input":"<!doctype! system\"#",
221     "output":["ParseError", "ParseError", ["DOCTYPE", "!", null, "#", false]]},
222    
223     {"description":"</z",
224     "input":"</z",
225     "output":["ParseError", ["EndTag", "z"]]},
226    
227     {"description":"<z>",
228     "input":"<z>",
229     "output":[["StartTag", "z", {}]]},
230    
231     {"description":"<z ",
232     "input":"<z ",
233     "output":["ParseError", ["StartTag", "z", {}]]},
234    
235     {"description":"<z/>",
236     "input":"<z/>",
237     "output":["ParseError", ["StartTag", "z", {}]]},
238    
239     {"description":"<z/ ",
240     "input":"<z/ ",
241     "output":["ParseError", "ParseError", ["StartTag", "z", {}]]},
242    
243     {"description":"<z//",
244     "input":"<z//",
245     "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {}]]},
246    
247     {"description":"<z",
248     "input":"<z",
249     "output":["ParseError", ["StartTag", "z", {}]]},
250    
251     {"description":"</z",
252     "input":"</z",
253     "output":["ParseError", ["EndTag", "z"]]},
254    
255     {"description":"<z0",
256     "input":"<z0",
257     "output":["ParseError", ["StartTag", "z0", {}]]},
258    
259     {"description":"<z/0=>",
260     "input":"<z/0=>",
261     "output":["ParseError", ["StartTag", "z", {"0": ""}]]},
262    
263     {"description":"<z/0= ",
264     "input":"<z/0= ",
265     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": ""}]]},
266    
267     {"description":"<z/0=?>",
268     "input":"<z/0=?>",
269     "output":["ParseError", ["StartTag", "z", {"0": "?"}]]},
270    
271     {"description":"<z/0=? ",
272     "input":"<z/0=? ",
273     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": "?"}]]},
274    
275     {"description":"<z/0=??",
276     "input":"<z/0=??",
277     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": "??"}]]},
278    
279     {"description":"<z/0=''",
280     "input":"<z/0=''",
281     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": ""}]]},
282    
283     {"description":"<z/0='&",
284     "input":"<z/0='&",
285     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": "&"}]]},
286    
287     {"description":"<z/0='%",
288     "input":"<z/0='%",
289     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": "%"}]]},
290    
291     {"description":"<z/0=\"'",
292     "input":"<z/0=\"'",
293     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": "'"}]]},
294    
295     {"description":"<z/0=\"\"",
296     "input":"<z/0=\"\"",
297     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": ""}]]},
298    
299     {"description":"<z/0=\"&",
300     "input":"<z/0=\"&",
301     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": "&"}]]},
302    
303     {"description":"<z/0=&",
304     "input":"<z/0=&",
305     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": "&"}]]},
306    
307     {"description":"<z/0>",
308     "input":"<z/0>",
309     "output":["ParseError", ["StartTag", "z", {"0": ""}]]},
310    
311     {"description":"<z/0 =",
312     "input":"<z/0 =",
313     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": ""}]]},
314    
315     {"description":"<z/0 >",
316     "input":"<z/0 >",
317     "output":["ParseError", ["StartTag", "z", {"0": ""}]]},
318    
319     {"description":"<z/0 ",
320     "input":"<z/0 ",
321     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": ""}]]},
322    
323     {"description":"<z/0 /",
324     "input":"<z/0 /",
325     "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {"0": ""}]]},
326    
327     {"description":"<z/0/",
328     "input":"<z/0/",
329     "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {"0": ""}]]},
330    
331     {"description":"<z/00",
332     "input":"<z/00",
333     "output":["ParseError", "ParseError", ["StartTag", "z", {"00": ""}]]},
334    
335     {"description":"<z/0 0",
336     "input":"<z/0 0",
337     "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {"0": ""}]]},
338    
339     {"description":"<z/0='&#9",
340     "input":"<z/0='&#9",
341     "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {"0": "\t"}]]},
342    
343     {"description":"<z/0=\"&#9",
344     "input":"<z/0=\"&#9",
345     "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {"0": "\t"}]]},
346    
347     {"description":"<z/0=&#9",
348     "input":"<z/0=&#9",
349     "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {"0": "\t"}]]},
350    
351     {"description":"<z/0z",
352     "input":"<z/0z",
353     "output":["ParseError", "ParseError", ["StartTag", "z", {"0z": ""}]]},
354    
355     {"description":"<z/0 z",
356     "input":"<z/0 z",
357     "output":["ParseError", "ParseError", ["StartTag", "z", {"0": "", "z": ""}]]},
358    
359     {"description":"<zz",
360     "input":"<zz",
361     "output":["ParseError", ["StartTag", "zz", {}]]},
362    
363     {"description":"<z/z",
364     "input":"<z/z",
365     "output":["ParseError", "ParseError", ["StartTag", "z", {"z": ""}]]}
366    
367     ]}

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24