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

Contents of /markup/html/whatpm/t/tokenizer-test-1.test

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Sat Jun 23 08:15:21 2007 UTC (17 years, 4 months ago) by wakaba
Branch: MAIN
Changes since 1.7: +39 -1 lines
++ whatpm/t/ChangeLog	23 Jun 2007 08:10:55 -0000
	* tokenizer-test-1.test: Tests for |<| in tags are
	added.  (HTML5 revisions 900, 901, 902, and 911.)

2007-06-23  Wakaba  <wakaba@suika.fam.cx>

++ whatpm/Whatpm/ChangeLog	23 Jun 2007 07:51:12 -0000
	* HTML.pm.src: HTML5 revisions 900, 901, 902, and 911 (<
	in tags).

2007-06-23  Wakaba  <wakaba@suika.fam.cx>

1 wakaba 1.1 {"tests": [
2    
3 wakaba 1.3 {"description":"<!DOCTYPE",
4     "input":"<!DOCTYPE",
5     "output":["ParseError","ParseError",["DOCTYPE", "", true]]},
6    
7     {"description":"<!DOCTYPE ",
8     "input":"<!DOCTYPE ",
9     "output":["ParseError",["DOCTYPE", "", true]]},
10    
11     {"description":"<!DOCTYPE >",
12     "input":"<!DOCTYPE >",
13     "output":["ParseError",["DOCTYPE", "", true]]},
14    
15     {"description":"<!DOCTYPE h",
16     "input":"<!DOCTYPE h",
17     "output":["ParseError",["DOCTYPE", "H", true]]},
18    
19     {"description":"<!DOCTYPE H",
20     "input":"<!DOCTYPE H",
21     "output":["ParseError",["DOCTYPE", "H", true]]},
22    
23     {"description":"<!DOCTYPE h>",
24     "input":"<!DOCTYPE h>",
25     "output":[["DOCTYPE", "H", true]]},
26    
27     {"description":"<!DOCTYPE H>",
28     "input":"<!DOCTYPE H>",
29     "output":[["DOCTYPE", "H", true]]},
30    
31     {"description":"<!DOCTYPE ht",
32     "input":"<!DOCTYPE ht",
33     "output":["ParseError",["DOCTYPE", "HT", true]]},
34    
35     {"description":"<!DOCTYPE Ht",
36     "input":"<!DOCTYPE Ht",
37     "output":["ParseError",["DOCTYPE", "HT", true]]},
38    
39     {"description":"<!DOCTYPE hT",
40     "input":"<!DOCTYPE hT",
41     "output":["ParseError",["DOCTYPE", "HT", true]]},
42    
43     {"description":"<!DOCTYPE ht>",
44     "input":"<!DOCTYPE ht>",
45     "output":[["DOCTYPE", "HT", true]]},
46    
47     {"description":"<!DOCTYPE Ht>",
48     "input":"<!DOCTYPE Ht>",
49     "output":[["DOCTYPE", "HT", true]]},
50    
51     {"description":"<!DOCTYPE hT>",
52     "input":"<!DOCTYPE hT>",
53     "output":[["DOCTYPE", "HT", true]]},
54    
55     {"description":"<!DOCTYPE hT>",
56     "input":"<!DOCTYPE hT>",
57     "output":[["DOCTYPE", "HT", true]]},
58    
59     {"description":"<!DOCTYPE htm",
60     "input":"<!DOCTYPE htm",
61     "output":["ParseError",["DOCTYPE", "HTM", true]]},
62    
63     {"description":"<!DOCTYPE Htm",
64     "input":"<!DOCTYPE Htm",
65     "output":["ParseError",["DOCTYPE", "HTM", true]]},
66    
67     {"description":"<!DOCTYPE hTM",
68     "input":"<!DOCTYPE hTM",
69     "output":["ParseError",["DOCTYPE", "HTM", true]]},
70    
71     {"description":"<!DOCTYPE htm>",
72     "input":"<!DOCTYPE htm>",
73     "output":[["DOCTYPE", "HTM", true]]},
74    
75     {"description":"<!DOCTYPE Htm>",
76     "input":"<!DOCTYPE Htm>",
77     "output":[["DOCTYPE", "HTM", true]]},
78    
79     {"description":"<!DOCTYPE hTM>",
80     "input":"<!DOCTYPE hTM>",
81     "output":[["DOCTYPE", "HTM", true]]},
82    
83     {"description":"<!DOCTYPE html5",
84     "input":"<!DOCTYPE html5",
85     "output":["ParseError",["DOCTYPE", "HTML5", true]]},
86    
87     {"description":"<!DOCTYPE html5>",
88     "input":"<!DOCTYPE html5>",
89     "output":[["DOCTYPE", "HTML5", true]]},
90    
91 wakaba 1.1 {"description":"non-PCDATA content model flag, start tag-like string",
92     "contentModelFlags":["PLAINTEXT","RCDATA","CDATA"],
93     "input":"<div>",
94 wakaba 1.2 "output":[["Character", "<div>"]]},
95    
96     {"description":"end tag followed by character data",
97     "contentModelFlags":["RCDATA","CDATA"],
98     "lastStartTag":"xxx",
99     "input":"AB</xxx>CD",
100 wakaba 1.4 "output":[["Character", "AB"],["EndTag", "xxx"],["Character", "CD"]]},
101 wakaba 1.1
102 wakaba 1.4 {"description":"c1 character references",
103     "input":"&#128;&#129;&#130;&#131;&#132;&#133;&#134;&#135;",
104     "output":[
105     "ParseError", ["Character", "\u20AC"],
106     "ParseError", ["Character", "\uFFFD"],
107     "ParseError", ["Character", "\u201A"],
108     "ParseError", ["Character", "\u0192"],
109     "ParseError", ["Character", "\u201E"],
110     "ParseError", ["Character", "\u2026"],
111     "ParseError", ["Character", "\u2020"],
112     "ParseError", ["Character", "\u2021"]
113     ]},
114     {"description":"c1 character references",
115     "input":"&#136;&#137;&#138;&#139;&#140;&#141;&#142;&#143;",
116     "output":[
117     "ParseError", ["Character", "\u02C6"],
118     "ParseError", ["Character", "\u2030"],
119     "ParseError", ["Character", "\u0160"],
120     "ParseError", ["Character", "\u2039"],
121     "ParseError", ["Character", "\u0152"],
122     "ParseError", ["Character", "\uFFFD"],
123     "ParseError", ["Character", "\u017D"],
124     "ParseError", ["Character", "\uFFFD"]
125     ]},
126     {"description":"c1 character references",
127     "input":"&#144;&#145;&#146;&#147;&#148;&#149;&#150;&#151;",
128     "output":[
129     "ParseError", ["Character", "\uFFFD"],
130     "ParseError", ["Character", "\u2018"],
131     "ParseError", ["Character", "\u2019"],
132     "ParseError", ["Character", "\u201C"],
133     "ParseError", ["Character", "\u201D"],
134     "ParseError", ["Character", "\u2022"],
135     "ParseError", ["Character", "\u2013"],
136     "ParseError", ["Character", "\u2014"]
137     ]},
138     {"description":"c1 character references",
139     "input":"&#152;&#153;&#154;&#155;&#156;&#157;&#158;&#159;",
140     "output":[
141     "ParseError", ["Character", "\u02DC"],
142     "ParseError", ["Character", "\u2122"],
143     "ParseError", ["Character", "\u0161"],
144     "ParseError", ["Character", "\u203A"],
145     "ParseError", ["Character", "\u0153"],
146     "ParseError", ["Character", "\uFFFD"],
147     "ParseError", ["Character", "\u017E"],
148     "ParseError", ["Character", "\u0178"]
149     ]},
150    
151     {"description":"c1 character references",
152     "input":"&#x80;&#x81;&#x82;&#x83;&#x84;&#x85;&#x86;&#x87;",
153     "output":[
154     "ParseError", ["Character", "\u20AC"],
155     "ParseError", ["Character", "\uFFFD"],
156     "ParseError", ["Character", "\u201A"],
157     "ParseError", ["Character", "\u0192"],
158     "ParseError", ["Character", "\u201E"],
159     "ParseError", ["Character", "\u2026"],
160     "ParseError", ["Character", "\u2020"],
161     "ParseError", ["Character", "\u2021"]
162     ]},
163     {"description":"c1 character references",
164     "input":"&#x88;&#x89;&#x8a;&#x8b;&#x8c;&#x8d;&#x8e;&#x8f;",
165     "output":[
166     "ParseError", ["Character", "\u02C6"],
167     "ParseError", ["Character", "\u2030"],
168     "ParseError", ["Character", "\u0160"],
169     "ParseError", ["Character", "\u2039"],
170     "ParseError", ["Character", "\u0152"],
171     "ParseError", ["Character", "\uFFFD"],
172     "ParseError", ["Character", "\u017D"],
173     "ParseError", ["Character", "\uFFFD"]
174     ]},
175     {"description":"c1 character references",
176     "input":"&#x90;&#x91;&#x92;&#x93;&#x94;&#x95;&#x96;&#x97;",
177     "output":[
178     "ParseError", ["Character", "\uFFFD"],
179     "ParseError", ["Character", "\u2018"],
180     "ParseError", ["Character", "\u2019"],
181     "ParseError", ["Character", "\u201C"],
182     "ParseError", ["Character", "\u201D"],
183     "ParseError", ["Character", "\u2022"],
184     "ParseError", ["Character", "\u2013"],
185     "ParseError", ["Character", "\u2014"]
186     ]},
187     {"description":"c1 character references",
188     "input":"&#x98;&#x99;&#x9a;&#x9b;&#x9c;&#x9d;&#x9e;&#x9f;",
189     "output":[
190     "ParseError", ["Character", "\u02DC"],
191     "ParseError", ["Character", "\u2122"],
192     "ParseError", ["Character", "\u0161"],
193     "ParseError", ["Character", "\u203A"],
194     "ParseError", ["Character", "\u0153"],
195     "ParseError", ["Character", "\uFFFD"],
196     "ParseError", ["Character", "\u017E"],
197     "ParseError", ["Character", "\u0178"]
198 wakaba 1.5 ]},
199    
200     {"description":"NULL character",
201     "input":"\u0000",
202 wakaba 1.6 "output":["ParseError",["Character", "\uFFFD"]]},
203    
204     {"description":"&TRADE;",
205     "input":"&TRADE;",
206 wakaba 1.7 "output":[["Character", "\u2122"]]},
207    
208     {"description":"&lang;",
209     "input":"&lang;",
210     "output":[["Character", "\u3008"]]},
211    
212     {"description":"&rang;",
213     "input":"&rang;",
214     "output":[["Character", "\u3009"]]},
215    
216     {"description":"&amp;;",
217     "input":"&amp;;",
218 wakaba 1.8 "output":[["Character", "&;"]]},
219    
220     {"description":"cdata end tag containing <",
221     "contentModelFlags":["RCDATA","CDATA"],
222     "lastStartTag":"xxx",
223     "input":"</xxx<div>",
224     "output":[["Character", "</xxx<div"]]},
225    
226     {"description":"< in tag name state",
227     "input":"<p<div>",
228     "output":[["StartTag", "p<div", {}]]},
229    
230     {"description":"< in before attribute name state",
231     "input":"<p <div>",
232     "output":[["StartTag", "p", {"<div":""}]]},
233    
234     {"description":"< in attribute name state",
235     "input":"<p align<div>",
236     "output":[["StartTag", "p", {"align<div":""}]]},
237    
238     {"description":"< in after attribute name state",
239     "input":"<p align <div>",
240     "output":[["StartTag", "p", {"align":"","<div":""}]]},
241    
242     {"description":"< in before attribute value state",
243     "input":"<p align=<div>",
244     "output":[["StartTag", "p", {"align":"<div"}]]},
245    
246     {"description":"< in attribute value (unquoted) state",
247     "input":"<p align=left<div>",
248     "output":[["StartTag", "p", {"align":"left<div"}]]},
249    
250     {"description":"< in attribute value (single-unquoted) state",
251     "input":"<p align='left<div>",
252     "output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]},
253    
254     {"description":"< in attribute value (double-unquoted) state",
255     "input":"<p align=\u0022left<div>",
256     "output":["ParseError", ["StartTag", "p", {"align":"left<div>"}]]}
257 wakaba 1.4
258     ]}

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24