jdk/test/java/net/URI/Test.java
changeset 5612 c0d1673e1ca6
parent 2 90ce3da70b43
child 5627 e636ac7a63a4
equal deleted inserted replaced
5611:b4ef86f105ec 5612:c0d1673e1ca6
  1089         test("p#f")
  1089         test("p#f")
  1090             .rslv(base).s("s").h("h").p("/a/p").f("f").sp("//h/a/p").z();
  1090             .rslv(base).s("s").h("h").p("/a/p").f("f").sp("//h/a/p").z();
  1091         test("").p("").sp("").z();
  1091         test("").p("").sp("").z();
  1092 
  1092 
  1093 
  1093 
       
  1094 
  1094         header("Emptiness");
  1095         header("Emptiness");
  1095 
  1096 
  1096         // Components that may be empty
  1097         // Components that may be empty
  1097         test("///p").p("/p").z();                 // Authority (w/ path)
  1098         test("///p").p("/p").z();                 // Authority (w/ path)
  1098         test("//@h/p").u("").h("h").p("/p").z();  // User info
  1099         test("//@h/p").u("").h("h").p("/p").z();  // User info
  1319         test ("resolve")
  1320         test ("resolve")
  1320             .rslv(base).spd("//host/foo bar/a/b/c/resolve")
  1321             .rslv(base).spd("//host/foo bar/a/b/c/resolve")
  1321             .sp("//host/foo%20bar/a/b/c/resolve").s("http")
  1322             .sp("//host/foo%20bar/a/b/c/resolve").s("http")
  1322             .pd("/foo bar/a/b/c/resolve").h("host")
  1323             .pd("/foo bar/a/b/c/resolve").h("host")
  1323             .p("/foo%20bar/a/b/c/resolve").z();
  1324             .p("/foo%20bar/a/b/c/resolve").z();
       
  1325 
       
  1326         // 6773270: java.net.URI fails to escape u0000
       
  1327         test("s", "a", "/\u0000", null)
       
  1328             .s("s").p("/%00").h("a")
       
  1329             .ta("s://a/%00").z();
  1324     }
  1330     }
  1325 
  1331 
  1326 
  1332 
  1327     static void eq0(Comparable u, Comparable v) throws URISyntaxException {
  1333     static void eq0(Comparable u, Comparable v) throws URISyntaxException {
  1328         testCount++;
  1334         testCount++;