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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584
|
Num Tests: 72
OpenID link parsing test cases
Copyright (C) 2005-2008, JanRain, Inc.
See COPYING for license information.
File format
-----------
All text before the first triple-newline (this chunk) should be ignored.
This file may be interpreted as Latin-1 or UTF-8.
Test cases separated by three line separators (`\n\n\n'). The test
cases consist of a headers section followed by a data block. These are
separated by a double newline. The headers consist of the header name,
followed by a colon, a space, the value, and a newline. There must be
one, and only one, `Name' header for a test case. There may be zero or
more link headers. The `Link' header consists of whitespace-separated
attribute pairs. A link header with an empty string as a value
indicates an empty but present link tag. The attribute pairs are `='
separated and not quoted.
Optional Links and attributes have a trailing `*'. A compilant
implementation may produce this as output or may not. A compliant
implementation will not produce any output that is absent from this
file.
Name: No link tag at all
<html>
<head>
</head>
</html>
Name: Link element first
<link>
Name: Link inside HTML, not head
<html>
<link>
Name: Link inside head, not html
<head>
<link>
Name: Link inside html, after head
<html>
<head>
</head>
<link>
Name: Link inside html, before head
<html>
<link>
<head>
Name: Link before html and head
<link>
<html>
<head>
Name: Link after html document with head
<html>
<head>
</head>
</html>
<link>
Name: Link inside html inside head, inside another html
<html>
<head>
<html>
<link>
Name: Link inside html inside head
<head>
<html>
<link>
Name: link inside body inside head inside html
<html>
<head>
<body>
<link>
Name: Link inside head inside head inside html
<html>
<head>
<head>
<link>
Name: Link inside script inside head inside html
<html>
<head>
<script>
<link>
</script>
Name: Link inside comment inside head inside html
<html>
<head/>
<link>
Name: Link inside of head after short head
<html>
<head/>
<head>
<link>
Name: Plain vanilla
Link:
<html>
<head>
<link>
Name: Ignore tags in the <script:... > namespace
Link*:
<html>
<head>
<script:paddypan>
<link>
</script:paddypan>
Name: Short link tag
Link:
<html>
<head>
<link/>
Name: Spaces in the HTML tag
Link:
<html >
<head>
<link>
Name: Spaces in the head tag
Link:
<html>
<head >
<link>
Name: Spaces in the link tag
Link:
<html>
<head>
<link >
Name: No whitespace
Link:
<html><head><link>
Name: Closed head tag
Link:
<html>
<head>
<link>
</head>
Name: One good, one bad (after close head)
Link:
<html>
<head>
<link>
</head>
<link>
Name: One good, one bad (after open body)
Link:
<html>
<head>
<link>
<body>
<link>
Name: ill formed (missing close head)
Link:
<html>
<head>
<link>
</html>
Name: Ill formed (no close head, link after </html>)
Link:
<html>
<head>
<link>
</html>
<link>
Name: Ignore random tags inside of html
Link:
<html>
<delicata>
<head>
<title>
<link>
Name: case-folding
Link*:
<HtMl>
<hEaD>
<LiNk>
Name: unexpected tags
Link:
<butternut>
<html>
<summer>
<head>
<turban>
<link>
Name: un-closed script tags
Link*:
<html>
<head>
<script>
<link>
Name: un-closed script tags (no whitespace)
Link*:
<html><head><script><link>
Name: un-closed comment
Link*:
<html>
<head>
<!--
<link>
Name: un-closed CDATA
Link*:
<html>
<head>
<![CDATA[
<link>
Name: cdata-like
Link*:
<html>
<head>
<![ACORN[
<link>
]]>
Name: comment close only
Link:
<html>
<head>
<link>
-->
Name: Vanilla, two links
Link:
Link:
<html>
<head>
<link>
<link>
Name: extra tag, two links
Link:
Link:
<html>
<gold nugget>
<head>
<link>
<link>
Name: case-fold, body ends, two links
Link:
Link*:
<html>
<head>
<link>
<LiNk>
<body>
<link>
Name: simple, non-quoted rel
Link: rel=openid.server
<html><head><link rel=openid.server>
Name: short tag has rel
Link: rel=openid.server
<html><head><link rel=openid.server/>
Name: short tag w/space has rel
Link: rel=openid.server
<html><head><link rel=openid.server />
Name: extra non-attribute, has rel
Link: rel=openid.server
<html><head><link hubbard rel=openid.server>
Name: non-attr, has rel, short
Link: rel=openid.server
<html><head><link hubbard rel=openid.server/>
Name: non-attr, has rel, short, space
Link: rel=openid.server
<html><head><link hubbard rel=openid.server />
Name: misplaced slash has rel
Link: rel=openid.server
<html><head><link / rel=openid.server>
Name: quoted rel
Link: rel=openid.server
<html><head><link rel="openid.server">
Name: single-quoted rel
Link: rel=openid.server
<html><head><link rel='openid.server'>
Name: two links w/ rel
Link: x=y
Link: a=b
<html><head><link x=y><link a=b>
Name: non-entity
Link: x=&y
<html><head><link x=&y>
Name: quoted non-entity
Link: x=&y
<html><head><link x="&y">
Name: quoted entity
Link: x=&
<html><head><link x="&">
Name: entity not processed
Link: x=
<html><head><link x="">
Name: <
Link: x=<
<html><head><link x="<">
Name: >
Link: x=>
<html><head><link x=">">
Name: "
Link: x="
<html><head><link x=""">
Name: &"
Link: x=&"
<html><head><link x="&"">
Name: mixed entity and non-entity
Link: x=&"…>
<html><head><link x="&"…>">
Name: mixed entity and non-entity (w/normal chars)
Link: x=x&"…>x
<html><head><link x="x&"…>x">
Name: broken tags
Link*: x=y
<html><head><link x=y<>
Name: missing close pointy
Link*: x=y
Link: z=y
<html><head><link x=y<link z=y />
Name: missing attribute value
Link: x=y y*=
Link: x=y
<html><head><link x=y y=><link x=y />
Name: Missing close pointy (no following)
Link*: x=y
<html><head><link x=y
Name: Should be quoted
Link*: x=<
<html><head><link x="<">
Name: Should be quoted (2)
Link*: x=>
<html><head><link x=">">
Name: Repeated attribute
Link: x=y
<html><head><link x=z x=y>
Name: Repeated attribute (2)
Link: x=y
<html><head><link x=y x=y>
Name: Two attributes
Link: x=y y=z
<html><head><link x=y y=z>
Name: Well-formed link rel="openid.server"
Link: rel=openid.server href=http://www.myopenid.com/server
<html>
<head>
<link rel="openid.server"
href="http://www.myopenid.com/server" />
</head>
</html>
Name: Well-formed link rel="openid.server" and "openid.delegate"
Link: rel=openid.server href=http://www.myopenid.com/server
Link: rel=openid.delegate href=http://example.myopenid.com/
<html><head><link rel="openid.server"
href="http://www.myopenid.com/server" />
<link rel="openid.delegate" href="http://example.myopenid.com/" />
</head></html>
Name: from brian's livejournal page
Link: rel=stylesheet href=http://www.livejournal.com/~serotta/res/319998/stylesheet?1130478711 type=text/css
Link: rel=openid.server href=http://www.livejournal.com/openid/server.bml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet"
href="http://www.livejournal.com/~serotta/res/319998/stylesheet?1130478711"
type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="foaf:maker"
content="foaf:mbox_sha1sum '12f8abdacb5b1a806711e23249da592c0d316260'" />
<meta name="robots" content="noindex, nofollow, noarchive" />
<meta name="googlebot" content="nosnippet" />
<link rel="openid.server"
href="http://www.livejournal.com/openid/server.bml" />
<title>Brian</title>
</head>
Name: non-ascii (Latin-1 or UTF8)
Link: x=®
<html><head><link x="®">
|