URI.js Test Suite

Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

  1. Acquire URI (0, 1, 1)
    1. (no message)
  2. URI Parsing (0, 168, 168)
    1. scheme errors: undefined
    2. scheme: uri
    3. userinfo: undefined
    4. host: undefined
    5. port: undefined
    6. path:
    7. query: undefined
    8. fragment: undefined
    9. userinfo errors: undefined
    10. scheme: undefined
    11. userinfo:
    12. host:
    13. port: undefined
    14. path:
    15. query: undefined
    16. fragment: undefined
    17. host errors: undefined
    18. scheme: undefined
    19. userinfo: undefined
    20. host:
    21. port: undefined
    22. path:
    23. query: undefined
    24. fragment: undefined
    25. port errors: undefined
    26. scheme: undefined
    27. userinfo: undefined
    28. host:
    29. port:
    30. path:
    31. query: undefined
    32. fragment: undefined
    33. path errors: undefined
    34. scheme: undefined
    35. userinfo: undefined
    36. host: undefined
    37. port: undefined
    38. path:
    39. query: undefined
    40. fragment: undefined
    41. query errors: undefined
    42. scheme: undefined
    43. userinfo: undefined
    44. host: undefined
    45. port: undefined
    46. path:
    47. query:
    48. fragment: undefined
    49. fragment errors: undefined
    50. scheme: undefined
    51. userinfo: undefined
    52. host: undefined
    53. port: undefined
    54. path:
    55. query: undefined
    56. fragment:
    57. path errors: undefined
    58. scheme: undefined
    59. userinfo: undefined
    60. host: undefined
    61. port: undefined
    62. path:
    63. query: undefined
    64. fragment: %09
    65. path errors: undefined
    66. scheme: undefined
    67. userinfo: undefined
    68. host: undefined
    69. port: undefined
    70. path:
    71. query: undefined
    72. fragment: %0A
    73. path errors: undefined
    74. scheme: undefined
    75. userinfo: undefined
    76. host: undefined
    77. port: undefined
    78. path:
    79. query: undefined
    80. fragment: %0B
    81. path errors: undefined
    82. scheme: undefined
    83. userinfo: undefined
    84. host: undefined
    85. port: undefined
    86. path:
    87. query: undefined
    88. fragment: %0C
    89. path errors: undefined
    90. scheme: undefined
    91. userinfo: undefined
    92. host: undefined
    93. port: undefined
    94. path:
    95. query: undefined
    96. fragment: %0D
    97. all errors: undefined
    98. scheme: uri
    99. userinfo: user:pass
    100. host: example.com
    101. port: 123
    102. path: /one/two.three
    103. query: q1=a1&q2=a2
    104. fragment: body
    105. IPv4address errors: undefined
    106. scheme: undefined
    107. userinfo: undefined
    108. host: 10.10.10.10
    109. port: undefined
    110. path:
    111. query: undefined
    112. fragment: undefined
    113. IPv4address errors: undefined
    114. scheme: undefined
    115. userinfo: undefined
    116. host: 2001:db8::7
    117. port: undefined
    118. path:
    119. query: undefined
    120. fragment: undefined
    121. IPv4address errors: undefined
    122. scheme: undefined
    123. userinfo: undefined
    124. host: ::ffff:129.144.52.38
    125. port: undefined
    126. path:
    127. query: undefined
    128. fragment: undefined
    129. mixed errors: undefined
    130. scheme: uri
    131. userinfo: undefined
    132. host: 10.10.10.10.example.com
    133. port: undefined
    134. path: /en/process
    135. query: undefined
    136. fragment: undefined
    137. IPv6address errors: undefined
    138. scheme: undefined
    139. userinfo: undefined
    140. host: 2606:2800:220:1:248:1893:25c8:1946
    141. port: undefined
    142. path: /test
    143. query: undefined
    144. fragment: undefined
    145. IPv6address errors: undefined
    146. scheme: undefined
    147. userinfo: undefined
    148. host: 2001:db8::1
    149. port: 80
    150. path:
    151. query: undefined
    152. fragment: undefined
    153. IPv4address errors: undefined
    154. scheme: undefined
    155. userinfo: undefined
    156. host: fe80::a%en1
    157. port: undefined
    158. path:
    159. query: undefined
    160. fragment: undefined
    161. IPv6address interface errors: undefined
    162. scheme: undefined
    163. userinfo: undefined
    164. host: 2001:db8::7%en0
    165. port: undefined
    166. path:
    167. query: undefined
    168. fragment: undefined
  3. URI Serialization (0, 12, 12)
    1. Undefined Components:
    2. Empty Components: //@:0?#
    3. All Components: uri://foo:bar@example.com:1/path?query#fragment
    4. Double slash path: /%2Fpath
    5. Colon path: foo%3Abar
    6. Query path: %3Fquery
    7. Mixed IPv4address & reg-name: //10.10.10.10.example.com
    8. IPv6 Host: //[2001:db8::7]
    9. IPv6 Mixed Host: //[::ffff:129.144.52.38]
    10. IPv6 Full Host: //[2606:2800:220:1:248:1893:25c8:1946]
    11. IPv6 Zone Unescaped Host: //[fe80::a%25en1]
    12. IPv6 Zone Escaped Host: //[fe80::a%25en1]
  4. URI Resolving (0, 46, 46)
    1. g:h: g:h
    2. g:h: g:h
    3. g: uri://a/b/c/g
    4. ./g: uri://a/b/c/g
    5. g/: uri://a/b/c/g/
    6. /g: uri://a/g
    7. //g: uri://g
    8. ?y: uri://a/b/c/d;p?y
    9. g?y: uri://a/b/c/g?y
    10. #s: uri://a/b/c/d;p?q#s
    11. g#s: uri://a/b/c/g#s
    12. g?y#s: uri://a/b/c/g?y#s
    13. ;x: uri://a/b/c/;x
    14. g;x: uri://a/b/c/g;x
    15. g;x?y#s: uri://a/b/c/g;x?y#s
    16. okay: uri://a/b/c/d;p?q
    17. .: uri://a/b/c/
    18. ./: uri://a/b/c/
    19. ..: uri://a/b/
    20. ../: uri://a/b/
    21. ../g: uri://a/b/g
    22. ../..: uri://a/
    23. ../../: uri://a/
    24. ../../g: uri://a/g
    25. ../../../g: uri://a/g
    26. ../../../../g: uri://a/g
    27. /./g: uri://a/g
    28. /../g: uri://a/g
    29. g.: uri://a/b/c/g.
    30. .g: uri://a/b/c/.g
    31. g..: uri://a/b/c/g..
    32. ..g: uri://a/b/c/..g
    33. ./../g: uri://a/b/g
    34. ./g/.: uri://a/b/c/g/
    35. g/./h: uri://a/b/c/g/h
    36. g/../h: uri://a/b/c/h
    37. g;x=1/./y: uri://a/b/c/g;x=1/y
    38. g;x=1/../y: uri://a/b/c/y
    39. g?y/./x: uri://a/b/c/g?y/./x
    40. g?y/../x: uri://a/b/c/g?y/../x
    41. g#s/./x: uri://a/b/c/g#s/./x
    42. g#s/../x: uri://a/b/c/g#s/../x
    43. uri:g: uri:g
    44. uri:g: uri://a/b/c/g
    45. /adf\ngf: //www.g.com/adf%0Agf
    46. //www.g.com/error\n/bleh/bleh: //www.g.com/error%0A/
  5. URI Normalizing (0, 13, 13)
    1. okay: uri://www.example.org/red%09ros%C3%A9#red
    2. okay: //192.68.1.0
    3. okay: http://[1080::8:800:200c:417a]/
    4. okay: //[2001:db8::1]/
    5. okay: //[2001:db8::1:0:1]/
    6. okay: //[2001:db8::2:1]/
    7. okay: //[2001:db8:0:1:1:1:1:1]/
    8. okay: //[2001:0:0:1::1]/
    9. okay: //[2001:db8::1:0:0:1]/
    10. okay: //[2001:db8::1]/
    11. okay: //[::ffff:192.0.2.1]/
    12. okay: //[1:2:3:4:5:6:192.0.2.1]/
    13. okay: //[1:2:3:4:5:6:192.68.1.0]/
  6. URI Equals (0, 2, 2)
    1. okay: true
    2. okay: true
  7. Escape Component (0, 134, 134)
    1. okay: %00
    2. okay: %01
    3. okay: %02
    4. okay: %03
    5. okay: %04
    6. okay: %05
    7. okay: %06
    8. okay: %07
    9. okay: %08
    10. okay: %09
    11. okay: %0A
    12. okay: %0B
    13. okay: %0C
    14. okay: %0D
    15. okay: %0E
    16. okay: %0F
    17. okay: %10
    18. okay: %11
    19. okay: %12
    20. okay: %13
    21. okay: %14
    22. okay: %15
    23. okay: %16
    24. okay: %17
    25. okay: %18
    26. okay: %19
    27. okay: %1A
    28. okay: %1B
    29. okay: %1C
    30. okay: %1D
    31. okay: %1E
    32. okay: %1F
    33. okay: %20
    34. okay: !
    35. okay: %22
    36. okay: %23
    37. okay: $
    38. okay: %25
    39. okay: &
    40. okay: '
    41. okay: (
    42. okay: )
    43. okay: *
    44. okay: +
    45. okay: ,
    46. okay: -
    47. okay: .
    48. okay: %2F
    49. okay: 0
    50. okay: 1
    51. okay: 2
    52. okay: 3
    53. okay: 4
    54. okay: 5
    55. okay: 6
    56. okay: 7
    57. okay: 8
    58. okay: 9
    59. okay: %3A
    60. okay: ;
    61. okay: %3C
    62. okay: =
    63. okay: %3E
    64. okay: %3F
    65. okay: %40
    66. okay: A
    67. okay: B
    68. okay: C
    69. okay: D
    70. okay: E
    71. okay: F
    72. okay: G
    73. okay: H
    74. okay: I
    75. okay: J
    76. okay: K
    77. okay: L
    78. okay: M
    79. okay: N
    80. okay: O
    81. okay: P
    82. okay: Q
    83. okay: R
    84. okay: S
    85. okay: T
    86. okay: U
    87. okay: V
    88. okay: W
    89. okay: X
    90. okay: Y
    91. okay: Z
    92. okay: %5B
    93. okay: %5C
    94. okay: %5D
    95. okay: %5E
    96. okay: _
    97. okay: %60
    98. okay: a
    99. okay: b
    100. okay: c
    101. okay: d
    102. okay: e
    103. okay: f
    104. okay: g
    105. okay: h
    106. okay: i
    107. okay: j
    108. okay: k
    109. okay: l
    110. okay: m
    111. okay: n
    112. okay: o
    113. okay: p
    114. okay: q
    115. okay: r
    116. okay: s
    117. okay: t
    118. okay: u
    119. okay: v
    120. okay: w
    121. okay: x
    122. okay: y
    123. okay: z
    124. okay: %7B
    125. okay: %7C
    126. okay: %7D
    127. okay: ~
    128. okay: %7F
    129. okay: %C2%80
    130. okay: %C2%81
    131. okay: %C3%80
    132. okay: %DF%BF
    133. okay: %E0%A0%80
    134. okay: %E3%82%A2
  8. Unescape Component (0, 134, 134)
    1. okay:
    2. okay: 
    3. okay: 
    4. okay: 
    5. okay: 
    6. okay: 
    7. okay: 
    8. okay: 
    9. okay: 
    10. okay:
    11. okay:
    12. okay:
    13. okay:
    14. okay:
    15. okay: 
    16. okay: 
    17. okay: 
    18. okay: 
    19. okay: 
    20. okay: 
    21. okay: 
    22. okay: 
    23. okay: 
    24. okay: 
    25. okay: 
    26. okay: 
    27. okay: 
    28. okay: 
    29. okay: 
    30. okay: 
    31. okay: 
    32. okay: 
    33. okay:
    34. okay: !
    35. okay: "
    36. okay: #
    37. okay: $
    38. okay: %
    39. okay: &
    40. okay: '
    41. okay: (
    42. okay: )
    43. okay: *
    44. okay: +
    45. okay: ,
    46. okay: -
    47. okay: .
    48. okay: /
    49. okay: 0
    50. okay: 1
    51. okay: 2
    52. okay: 3
    53. okay: 4
    54. okay: 5
    55. okay: 6
    56. okay: 7
    57. okay: 8
    58. okay: 9
    59. okay: :
    60. okay: ;
    61. okay: <
    62. okay: =
    63. okay: >
    64. okay: ?
    65. okay: @
    66. okay: A
    67. okay: B
    68. okay: C
    69. okay: D
    70. okay: E
    71. okay: F
    72. okay: G
    73. okay: H
    74. okay: I
    75. okay: J
    76. okay: K
    77. okay: L
    78. okay: M
    79. okay: N
    80. okay: O
    81. okay: P
    82. okay: Q
    83. okay: R
    84. okay: S
    85. okay: T
    86. okay: U
    87. okay: V
    88. okay: W
    89. okay: X
    90. okay: Y
    91. okay: Z
    92. okay: [
    93. okay: \
    94. okay: ]
    95. okay: ^
    96. okay: _
    97. okay: `
    98. okay: a
    99. okay: b
    100. okay: c
    101. okay: d
    102. okay: e
    103. okay: f
    104. okay: g
    105. okay: h
    106. okay: i
    107. okay: j
    108. okay: k
    109. okay: l
    110. okay: m
    111. okay: n
    112. okay: o
    113. okay: p
    114. okay: q
    115. okay: r
    116. okay: s
    117. okay: t
    118. okay: u
    119. okay: v
    120. okay: w
    121. okay: x
    122. okay: y
    123. okay: z
    124. okay: {
    125. okay: |
    126. okay: }
    127. okay: ~
    128. okay: 
    129. okay: €
    130. okay: 
    131. okay: À
    132. okay: ߿
    133. okay: ࠀ
    134. okay: ア
  9. IRI Parsing (0, 8, 8)
    1. all errors: undefined
    2. scheme: uri
    3. userinfo: us er:pa퟿ss
    4. host: example.com
    5. port: 123
    6. path: /o豈ne/t﷏wo.tﷰhree
    7. query: q1=a1&q2=a2
    8. fragment: bo￯dy
  10. IRI Serialization (0, 1, 1)
    1. okay: uri://us er:pa퟿ss@example.com:123/o豈ne/t﷏wo.tﷰhree?q1=a1&q2=a2#bo￯dy%EE%80%81
  11. IRI Normalizing (0, 1, 1)
    1. okay: uri://www.example.org/red%09rosé#red
  12. IRI Equals (0, 1, 1)
    1. okay: true
  13. Convert IRI to URI (0, 2, 2)
    1. okay: uri://www.example.org/red%09ros%C3%A9#red
    2. okay: uri://xn--rsum-bpad.example.org
  14. Convert URI to IRI (0, 4, 4)
    1. okay: uri://www.example.org/Dürst
    2. okay: uri://www.example.org/D%FCrst
    3. okay: uri://xn--99zt52a.example.org/%E2%80%AE
    4. okay: uri://résumé.example.org
  15. HTTP Equals (0, 5, 5)
    1. okay: true
    2. okay: true
    3. okay: true
    4. okay: true
    5. okay: true
  16. HTTPS Equals (0, 2, 2)
    1. okay: true
    2. okay: true
  17. URN Parsing (0, 10, 10)
    1. errors: undefined
    2. scheme: urn
    3. userinfo: undefined
    4. host: undefined
    5. port: undefined
    6. path: undefined
    7. query: undefined
    8. fragment: undefined
    9. nid: foo
    10. nss: a123,456
  18. URN Serialization (0, 1, 1)
    1. okay: urn:foo:a123,456
  19. URN Equals (0, 5, 5)
    1. okay: true
    2. okay: true
    3. okay: true
    4. okay: false
    5. okay: true
  20. URN Resolving (0, 4, 4)
    1. okay: urn:some:ip:prop
    2. okay: urn:some:ip:prop
    3. okay: urn:some:ip:prop
    4. okay: urn:some:ip:prop
  21. UUID Parsing (0, 12, 12)
    1. errors: undefined
    2. scheme: urn
    3. userinfo: undefined
    4. host: undefined
    5. port: undefined
    6. path: undefined
    7. query: undefined
    8. fragment: undefined
    9. nid: uuid
    10. nss: undefined
    11. uuid: f81d4fae-7dec-11d0-a765-00a0c91e6bf6
    12. errors: undefined
  22. UUID Serialization (0, 2, 2)
    1. okay: urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
    2. okay: urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6
  23. UUID Equals (0, 1, 1)
    1. okay: true
  24. URN NID Override (0, 7, 7)
    1. errors: undefined
    2. scheme: urn
    3. path: undefined
    4. nid: foo
    5. nss: undefined
    6. uuid: f81d4fae-7dec-11d0-a765-00a0c91e6bf6
    7. okay: urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
  25. Mailto Parse (0, 41, 41)
    1. error: undefined
    2. scheme: mailto
    3. userinfo: undefined
    4. host: undefined
    5. port: undefined
    6. path: undefined
    7. query: undefined
    8. fragment: undefined
    9. to: chris@example.com
    10. subject: undefined
    11. body: undefined
    12. headers: undefined
    13. to: infobot@example.com
    14. subject: current-issue
    15. to: infobot@example.com
    16. body: send current-issue
    17. to: infobot@example.com
    18. body: send current-issue send index
    19. to: list@example.org
    20. headers: [object Object]
    21. to: majordomo@example.com
    22. body: subscribe bamboo-l
    23. to: joe@example.com
    24. body: hello
    25. headers: [object Object]
    26. to gorby%kremvax@example.com: gorby%kremvax@example.com
    27. to unlikely?address@example.com: unlikely?address@example.com
    28. headers: [object Object]
    29. to Mike&family@example.org: Mike&family@example.org
    30. to "not@me"@example.org: "not@me"@example.org
    31. to "oh\\no"@example.org: "oh\\no"@example.org
    32. to "\\\"it's\ ugly\\\""@example.org: "\\\"it's\ ugly\\\""@example.org
    33. to: user@example.org
    34. subject: café
    35. to: user@example.org
    36. subject: =?utf-8?Q?caf=C3=A9?=
    37. to: user@example.org
    38. subject: =?iso-8859-1?Q?caf=E9?=
    39. to: user@example.org
    40. subject: café
    41. body: café
  26. Mailto Serialize (0, 17, 17)
    1. okay: mailto:chris@example.com
    2. okay: mailto:infobot@example.com?body=current-issue
    3. okay: mailto:infobot@example.com?body=send%20current-issue
    4. okay: mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index
    5. okay: mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E
    6. okay: mailto:majordomo@example.com?body=subscribe%20bamboo-l
    7. okay: mailto:joe@example.com?cc=bob@example.com&body=hello
    8. okay: mailto:gorby%25kremvax@example.com
    9. okay: mailto:unlikely%3Faddress@example.com?blat=foop
    10. okay: mailto:Mike%26family@example.org
    11. okay: mailto:%22not%40me%22@example.org
    12. okay: mailto:%22oh%5C%5Cno%22@example.org
    13. okay: mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org
    14. okay: mailto:user@example.org?subject=caf%C3%A9
    15. okay: mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D
    16. okay: mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D
    17. okay: mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9
  27. Mailto Equals (0, 2, 2)
    1. okay: true
    2. okay: true

Tests completed in 70 milliseconds.
636 tests of 636 passed, 0 failed.