langtools/test/com/sun/javadoc/testHref/TestHref.java
changeset 20257 9da4f6c30089
parent 17566 7e1a338e1085
child 21008 af0b915df7cc
equal deleted inserted replaced
20256:9154c5cc0d9f 20257:9da4f6c30089
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug      4663254
    26  * @bug      4663254 8016328
    27  * @summary  Verify that spaces do not appear in hrefs and anchors.
    27  * @summary  Verify that spaces do not appear in hrefs and anchors.
    28  * @author   jamieh
    28  * @author   jamieh
    29  * @library  ../lib/
    29  * @library  ../lib/
    30  * @build    JavadocTester TestHref
    30  * @build    JavadocTester TestHref
    31  * @run main TestHref
    31  * @run main TestHref
    44 
    44 
    45     //Input for string search tests.
    45     //Input for string search tests.
    46     private static final String[][] TEST = {
    46     private static final String[][] TEST = {
    47         //External link.
    47         //External link.
    48         {BUG_ID + FS + "pkg" + FS + "C1.html",
    48         {BUG_ID + FS + "pkg" + FS + "C1.html",
    49             "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long, int)\""
    49             "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)\""
    50         },
    50         },
    51         //Member summary table link.
    51         //Member summary table link.
    52         {BUG_ID + FS + "pkg" + FS + "C1.html",
    52         {BUG_ID + FS + "pkg" + FS + "C1.html",
    53             "href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\""
    53             "href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\""
    54         },
    54         },
    55         //Anchor test.
    55         //Anchor test.
    56         {BUG_ID + FS + "pkg" + FS + "C1.html",
    56         {BUG_ID + FS + "pkg" + FS + "C1.html",
    57             "<a name=\"method(int, int, java.util.ArrayList)\">" + NL +
    57             "<a name=\"method(int, int, java.util.ArrayList)\">" + NL +
    58             "<!--   -->" + NL +
    58             "<!--   -->" + NL +
    64             "<!--   -->" + NL +
    64             "<!--   -->" + NL +
    65             "</a>"
    65             "</a>"
    66         },
    66         },
    67         //{@link} test.
    67         //{@link} test.
    68         {BUG_ID + FS + "pkg" + FS + "C2.html",
    68         {BUG_ID + FS + "pkg" + FS + "C2.html",
    69             "Link: <a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
    69             "Link: <a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
    70         },
    70         },
    71         //@see test.
    71         //@see test.
    72         {BUG_ID + FS + "pkg" + FS + "C2.html",
    72         {BUG_ID + FS + "pkg" + FS + "C2.html",
    73             "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
    73             "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
    74         },
    74         },
    75 
    75 
    76         //Header does not link to the page itself.
    76         //Header does not link to the page itself.
    77         {BUG_ID + FS + "pkg" + FS + "C4.html",
    77         {BUG_ID + FS + "pkg" + FS + "C4.html",
    78             "Class C4&lt;E extends C4&lt;E&gt;&gt;</h2>"
    78             "Class C4&lt;E extends C4&lt;E&gt;&gt;</h2>"