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

Diff of /markup/html/whatpm/t/tokenizer/test4.test

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by wakaba, Mon Jul 16 07:03:09 2007 UTC revision 1.5 by wakaba, Sun Jun 1 05:42:06 2008 UTC
# Line 8  Line 8 
8  "input":"<z x=<",  "input":"<z x=<",
9  "output":["ParseError", ["StartTag", "z", {"x": "<"}]]},  "output":["ParseError", ["StartTag", "z", {"x": "<"}]]},
10    
11    {"description":"= in unquoted attribute value",
12    "input":"<z z=z=z>",
13    "output":["ParseError", ["StartTag", "z", {"z": "z=z"}]]},
14    
15    {"description":"= attribute",
16    "input":"<z =>",
17    "output":["ParseError", ["StartTag", "z", {"=": ""}]]},
18    
19    {"description":"== attribute",
20    "input":"<z ==>",
21    "output":["ParseError", ["StartTag", "z", {"=": ""}]]},
22    
23    {"description":"=== attribute",
24    "input":"<z ===>",
25    "output":["ParseError", "ParseError", ["StartTag", "z", {"=": "="}]]},
26    
27    {"description":"==== attribute",
28    "input":"<z ====>",
29    "output":["ParseError", "ParseError", "ParseError", ["StartTag", "z", {"=": "=="}]]},
30    
31    {"description":"Allowed \" after ampersand in attribute value",
32    "input":"<z z=\"&\">",
33    "output":[["StartTag", "z", {"z": "&"}]]},
34    
35    {"description":"Non-allowed ' after ampersand in attribute value",
36    "input":"<z z=\"&'\">",
37    "output":["ParseError", ["StartTag", "z", {"z": "&'"}]]},
38    
39    {"description":"Allowed ' after ampersand in attribute value",
40    "input":"<z z='&'>",
41    "output":[["StartTag", "z", {"z": "&"}]]},
42    
43    {"description":"Non-allowed \" after ampersand in attribute value",
44    "input":"<z z='&\"'>",
45    "output":["ParseError", ["StartTag", "z", {"z": "&\""}]]},
46    
47    {"description":"Attribute name starting with \"",
48    "input":"<foo \"='bar'>",
49    "output":["ParseError", ["StartTag", "foo", {"\"": "bar"}]]},
50    
51    {"description":"Attribute name starting with '",
52    "input":"<foo '='bar'>",
53    "output":["ParseError", ["StartTag", "foo", {"'": "bar"}]]},
54    
55    {"description":"Attribute name containing \"",
56    "input":"<foo a\"b='bar'>",
57    "output":["ParseError", ["StartTag", "foo", {"a\"b": "bar"}]]},
58    
59    {"description":"Attribute name containing '",
60    "input":"<foo a'b='bar'>",
61    "output":["ParseError", ["StartTag", "foo", {"a'b": "bar"}]]},
62    
63    {"description":"Unquoted attribute value containing '",
64    "input":"<foo a=b'c>",
65    "output":["ParseError", ["StartTag", "foo", {"a": "b'c"}]]},
66    
67    {"description":"Unquoted attribute value containing \"",
68    "input":"<foo a=b\"c>",
69    "output":["ParseError", ["StartTag", "foo", {"a": "b\"c"}]]},
70    
71    {"description":"Double-quoted attribute value not followed by whitespace",
72    "input":"<foo a=\"b\"c>",
73    "output":["ParseError", ["StartTag", "foo", {"a": "b", "c": ""}]]},
74    
75    {"description":"Single-quoted attribute value not followed by whitespace",
76    "input":"<foo a='b'c>",
77    "output":["ParseError", ["StartTag", "foo", {"a": "b", "c": ""}]]},
78    
79    {"description":"Quoted attribute followed by permitted /",
80    "input":"<br a='b'/>",
81    "output":[["StartTag","br",{"a":"b"},true]]},
82    
83    {"description":"Quoted attribute followed by non-permitted /",
84    "input":"<bar a='b'/>",
85    "output":[["StartTag","bar",{"a":"b"},true]]},
86    
87  {"description":"CR EOF after doctype name",  {"description":"CR EOF after doctype name",
88  "input":"<!doctype html \r",  "input":"<!doctype html \r",
89  "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},  "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
# Line 106  Line 182 
182    
183  {"description":"Permitted slash",  {"description":"Permitted slash",
184  "input":"<br/>",  "input":"<br/>",
185  "output":[["StartTag", "br", {}]]},  "output":[["StartTag","br",{},true]]},
186    
187  {"description":"Non-permitted slash",  {"description":"Non-permitted slash",
188  "input":"<xr/>",  "input":"<xr/>",
189  "output":["ParseError", ["StartTag", "xr", {}]]},  "output":[["StartTag","xr",{},true]]},
190    
191  {"description":"Permitted slash but in close tag",  {"description":"Permitted slash but in close tag",
192  "input":"</br/>",  "input":"</br/>",
# Line 142  Line 218 
218  "output":["ParseError", "ParseError", ["Comment", "doc\uFFFD"]],  "output":["ParseError", "ParseError", ["Comment", "doc\uFFFD"]],
219  "ignoreErrorOrder":true},  "ignoreErrorOrder":true},
220    
221    {"description":"U+0080 in lookahead region",
222    "input":"<!doc\u0080",
223    "output":["ParseError", "ParseError", ["Comment", "doc\u0080"]],
224    "ignoreErrorOrder":true},
225    
226    {"description":"U+FDD1 in lookahead region",
227    "input":"<!doc\uFDD1",
228    "output":["ParseError", "ParseError", ["Comment", "doc\uFDD1"]],
229    "ignoreErrorOrder":true},
230    
231    {"description":"U+1FFFF in lookahead region",
232    "input":"<!doc\uD83F\uDFFF",
233    "output":["ParseError", "ParseError", ["Comment", "doc\uD83F\uDFFF"]],
234    "ignoreErrorOrder":true},
235    
236  {"description":"CR followed by U+0000",  {"description":"CR followed by U+0000",
237  "input":"\r\u0000",  "input":"\r\u0000",
238  "output":["ParseError", ["Character", "\n\uFFFD"]],  "output":["ParseError", ["Character", "\n\uFFFD"]],
# Line 173  Line 264 
264    
265  {"description":"LF CR",  {"description":"LF CR",
266  "input":"\n\r",  "input":"\n\r",
267  "output":[["Character", "\n\n"]]}  "output":[["Character", "\n\n"]]},
268    
269    {"description":"text CR CR CR text",
270    "input":"text\r\r\rtext",
271    "output":[["Character", "text\n\n\ntext"]]},
272    
273    {"description":"Doctype publik",
274    "input":"<!DOCTYPE html PUBLIK \"AbC\" \"XyZ\">",
275    "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
276    
277    {"description":"Doctype publi",
278    "input":"<!DOCTYPE html PUBLI",
279    "output":["ParseError", "ParseError", ["DOCTYPE", "html", null, null, false]]},
280    
281    {"description":"Doctype sistem",
282    "input":"<!DOCTYPE html SISTEM \"AbC\">",
283    "output":["ParseError", ["DOCTYPE", "html", null, null, false]]},
284    
285    {"description":"Doctype sys",
286    "input":"<!DOCTYPE html SYS",
287    "output":["ParseError", "ParseError", ["DOCTYPE", "html", null, null, false]]}
288    
289  ]}  ]}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24