getting file size for all dict files to be downloaded. coming to be 400mb or so.
[worddb.git] / libs / openid / test / linkparse.txt
blob74c63ca7961f2cb3a1628f6e5301c08c95d4d43e
1 Num Tests: 72
3 OpenID link parsing test cases
4 Copyright (C) 2005-2008, JanRain, Inc.
5 See COPYING for license information.
7 File format
8 -----------
10 All text before the first triple-newline (this chunk) should be ignored.
12 This file may be interpreted as Latin-1 or UTF-8.
14 Test cases separated by three line separators (`\n\n\n'). The test
15 cases consist of a headers section followed by a data block. These are
16 separated by a double newline. The headers consist of the header name,
17 followed by a colon, a space, the value, and a newline. There must be
18 one, and only one, `Name' header for a test case. There may be zero or
19 more link headers. The `Link' header consists of whitespace-separated
20 attribute pairs. A link header with an empty string as a value
21 indicates an empty but present link tag. The attribute pairs are `='
22 separated and not quoted.
24 Optional Links and attributes have a trailing `*'. A compilant
25 implementation may produce this as output or may not. A compliant
26 implementation will not produce any output that is absent from this
27 file.
30 Name: No link tag at all
32 <html>
33 <head>
34 </head>
35 </html>
38 Name: Link element first
40 <link>
43 Name: Link inside HTML, not head
45 <html>
46 <link>
49 Name: Link inside head, not html
51 <head>
52 <link>
55 Name: Link inside html, after head
57 <html>
58 <head>
59 </head>
60 <link>
63 Name: Link inside html, before head
65 <html>
66 <link>
67 <head>
70 Name: Link before html and head
72 <link>
73 <html>
74 <head>
77 Name: Link after html document with head
79 <html>
80 <head>
81 </head>
82 </html>
83 <link>
86 Name: Link inside html inside head, inside another html
88 <html>
89 <head>
90 <html>
91 <link>
94 Name: Link inside html inside head
96 <head>
97 <html>
98 <link>
101 Name: link inside body inside head inside html
103 <html>
104 <head>
105 <body>
106 <link>
109 Name: Link inside head inside head inside html
111 <html>
112 <head>
113 <head>
114 <link>
117 Name: Link inside script inside head inside html
119 <html>
120 <head>
121 <script>
122 <link>
123 </script>
126 Name: Link inside comment inside head inside html
128 <html>
129 <head/>
130 <link>
133 Name: Link inside of head after short head
135 <html>
136 <head/>
137 <head>
138 <link>
141 Name: Plain vanilla
142 Link:
144 <html>
145 <head>
146 <link>
149 Name: Ignore tags in the <script:... > namespace
150 Link*:
152 <html>
153 <head>
154 <script:paddypan>
155 <link>
156 </script:paddypan>
159 Name: Short link tag
160 Link:
162 <html>
163 <head>
164 <link/>
167 Name: Spaces in the HTML tag
168 Link:
170 <html >
171 <head>
172 <link>
175 Name: Spaces in the head tag
176 Link:
178 <html>
179 <head >
180 <link>
183 Name: Spaces in the link tag
184 Link:
186 <html>
187 <head>
188 <link >
191 Name: No whitespace
192 Link:
194 <html><head><link>
197 Name: Closed head tag
198 Link:
200 <html>
201 <head>
202 <link>
203 </head>
206 Name: One good, one bad (after close head)
207 Link:
209 <html>
210 <head>
211 <link>
212 </head>
213 <link>
216 Name: One good, one bad (after open body)
217 Link:
219 <html>
220 <head>
221 <link>
222 <body>
223 <link>
226 Name: ill formed (missing close head)
227 Link:
229 <html>
230 <head>
231 <link>
232 </html>
235 Name: Ill formed (no close head, link after </html>)
236 Link:
238 <html>
239 <head>
240 <link>
241 </html>
242 <link>
245 Name: Ignore random tags inside of html
246 Link:
248 <html>
249 <delicata>
250 <head>
251 <title>
252 <link>
255 Name: case-folding
256 Link*:
258 <HtMl>
259 <hEaD>
260 <LiNk>
263 Name: unexpected tags
264 Link:
266 <butternut>
267 <html>
268 <summer>
269 <head>
270 <turban>
271 <link>
274 Name: un-closed script tags
275 Link*:
277 <html>
278 <head>
279 <script>
280 <link>
283 Name: un-closed script tags (no whitespace)
284 Link*:
286 <html><head><script><link>
289 Name: un-closed comment
290 Link*:
292 <html>
293 <head>
294 <!--
295 <link>
298 Name: un-closed CDATA
299 Link*:
301 <html>
302 <head>
303 <![CDATA[
304 <link>
307 Name: cdata-like
308 Link*:
310 <html>
311 <head>
312 <![ACORN[
313 <link>
317 Name: comment close only
318 Link:
320 <html>
321 <head>
322 <link>
326 Name: Vanilla, two links
327 Link:
328 Link:
330 <html>
331 <head>
332 <link>
333 <link>
336 Name: extra tag, two links
337 Link:
338 Link:
340 <html>
341 <gold nugget>
342 <head>
343 <link>
344 <link>
347 Name: case-fold, body ends, two links
348 Link:
349 Link*:
351 <html>
352 <head>
353 <link>
354 <LiNk>
355 <body>
356 <link>
359 Name: simple, non-quoted rel
360 Link: rel=openid.server
362 <html><head><link rel=openid.server>
365 Name: short tag has rel
366 Link: rel=openid.server
368 <html><head><link rel=openid.server/>
371 Name: short tag w/space has rel
372 Link: rel=openid.server
374 <html><head><link rel=openid.server />
377 Name: extra non-attribute, has rel
378 Link: rel=openid.server
380 <html><head><link hubbard rel=openid.server>
383 Name: non-attr, has rel, short
384 Link: rel=openid.server
386 <html><head><link hubbard rel=openid.server/>
389 Name: non-attr, has rel, short, space
390 Link: rel=openid.server
392 <html><head><link hubbard rel=openid.server />
395 Name: misplaced slash has rel
396 Link: rel=openid.server
398 <html><head><link / rel=openid.server>
401 Name: quoted rel
402 Link: rel=openid.server
404 <html><head><link rel="openid.server">
407 Name: single-quoted rel
408 Link: rel=openid.server
410 <html><head><link rel='openid.server'>
413 Name: two links w/ rel
414 Link: x=y
415 Link: a=b
417 <html><head><link x=y><link a=b>
420 Name: non-entity
421 Link: x=&y
423 <html><head><link x=&y>
426 Name: quoted non-entity
427 Link: x=&y
429 <html><head><link x="&y">
432 Name: quoted entity
433 Link: x=&
435 <html><head><link x="&amp;">
438 Name: entity not processed
439 Link: x=&#26;
441 <html><head><link x="&#26;">
444 Name: &lt;
445 Link: x=<
447 <html><head><link x="&lt;">
450 Name: &gt;
451 Link: x=>
453 <html><head><link x="&gt;">
456 Name: &quot;
457 Link: x="
459 <html><head><link x="&quot;">
462 Name: &amp;&quot;
463 Link: x=&"
465 <html><head><link x="&amp;&quot;">
468 Name: mixed entity and non-entity
469 Link: x=&"&hellip;>
471 <html><head><link x="&amp;&quot;&hellip;&gt;">
474 Name: mixed entity and non-entity (w/normal chars)
475 Link: x=x&"&hellip;>x
477 <html><head><link x="x&amp;&quot;&hellip;&gt;x">
480 Name: broken tags
481 Link*: x=y
483 <html><head><link x=y<>
486 Name: missing close pointy
487 Link*: x=y
488 Link: z=y
490 <html><head><link x=y<link z=y />
493 Name: missing attribute value
494 Link: x=y y*=
495 Link: x=y
497 <html><head><link x=y y=><link x=y />
500 Name: Missing close pointy (no following)
501 Link*: x=y
503 <html><head><link x=y
506 Name: Should be quoted
507 Link*: x=<
509 <html><head><link x="<">
512 Name: Should be quoted (2)
513 Link*: x=>
515 <html><head><link x=">">
518 Name: Repeated attribute
519 Link: x=y
521 <html><head><link x=z x=y>
524 Name: Repeated attribute (2)
525 Link: x=y
527 <html><head><link x=y x=y>
530 Name: Two attributes
531 Link: x=y y=z
533 <html><head><link x=y y=z>
536 Name: Well-formed link rel="openid.server"
537 Link: rel=openid.server href=http://www.myopenid.com/server
539 <html>
540   <head>
541     <link rel="openid.server"
542           href="http://www.myopenid.com/server" />
543   </head>
544 </html>
547 Name: Well-formed link rel="openid.server" and "openid.delegate"
548 Link: rel=openid.server href=http://www.myopenid.com/server
549 Link: rel=openid.delegate href=http://example.myopenid.com/
551 <html><head><link rel="openid.server"
552                   href="http://www.myopenid.com/server" />
553             <link rel="openid.delegate" href="http://example.myopenid.com/" />
554 </head></html>
557 Name: from brian's livejournal page
558 Link: rel=stylesheet href=http://www.livejournal.com/~serotta/res/319998/stylesheet?1130478711 type=text/css
559 Link: rel=openid.server href=http://www.livejournal.com/openid/server.bml
561 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
562           "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
563 <html xmlns="http://www.w3.org/1999/xhtml">
564   <head>
565     <link rel="stylesheet"
566           href="http://www.livejournal.com/~serotta/res/319998/stylesheet?1130478711"
567           type="text/css" />
568     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
569     <meta name="foaf:maker"
570           content="foaf:mbox_sha1sum '12f8abdacb5b1a806711e23249da592c0d316260'" />
571     <meta name="robots" content="noindex, nofollow, noarchive" />
572     <meta name="googlebot" content="nosnippet" />
573     <link rel="openid.server"
574           href="http://www.livejournal.com/openid/server.bml" />
575     <title>Brian</title>
576   </head>
579 Name: non-ascii (Latin-1 or UTF8)
580 Link: x=®
582 <html><head><link x="®">