24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4524136 |
26 * @bug 4524136 |
27 * @summary Test to make sure label is used for inline links. |
27 * @summary Test to make sure label is used for inline links. |
28 * @author jamieh |
28 * @author jamieh |
29 * @library ../lib/ |
29 * @library ../lib |
30 * @build JavadocTester |
30 * @build JavadocTester |
31 * @build TestInlineLinkLabel |
|
32 * @run main TestInlineLinkLabel |
31 * @run main TestInlineLinkLabel |
33 */ |
32 */ |
34 |
33 |
35 public class TestInlineLinkLabel extends JavadocTester { |
34 public class TestInlineLinkLabel extends JavadocTester { |
36 |
35 |
37 private static final String[][] TEST = { |
36 public static void main(String... args) throws Exception { |
38 //Search for the label to the package link. |
37 TestInlineLinkLabel tester = new TestInlineLinkLabel(); |
39 { "pkg/C1.html" , |
38 tester.runTests(); |
40 "<a href=\"../pkg/package-summary.html\"><code>Here is a link to a package</code></a>"}, |
39 } |
41 |
40 |
42 //Search for the label to the class link |
41 @Test |
43 { "pkg/C1.html" , |
42 void test() { |
44 "<a href=\"../pkg/C2.html\" title=\"class in pkg\"><code>Here is a link to a class</code></a>"} |
43 javadoc("-d", "out", |
45 }; |
44 "-sourcepath", testSrc, |
46 private static final String[] ARGS = |
45 "pkg"); |
47 new String[] { |
46 checkExit(Exit.OK); |
48 "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg"}; |
|
49 |
47 |
50 /** |
48 checkOutput("pkg/C1.html", true, |
51 * The entry point of the test. |
49 //Search for the label to the package link. |
52 * @param args the array of command line arguments. |
50 "<a href=\"../pkg/package-summary.html\"><code>Here is a link to a package</code></a>", |
53 */ |
51 //Search for the label to the class link |
54 public static void main(String[] args) { |
52 "<a href=\"../pkg/C2.html\" title=\"class in pkg\"><code>Here is a link to a class</code></a>"); |
55 TestInlineLinkLabel tester = new TestInlineLinkLabel(); |
|
56 tester.run(ARGS, TEST, NO_TEST); |
|
57 tester.printSummary(); |
|
58 } |
53 } |
59 } |
54 } |