27 * @summary Use a Taglet and include some inline tags such as {@link}. The |
27 * @summary Use a Taglet and include some inline tags such as {@link}. The |
28 * inline tags should be interpreted properly. |
28 * inline tags should be interpreted properly. |
29 * Run Javadoc on some sample source that uses {@inheritDoc}. Make |
29 * Run Javadoc on some sample source that uses {@inheritDoc}. Make |
30 * sure that only the first sentence shows up in the summary table. |
30 * sure that only the first sentence shows up in the summary table. |
31 * @author jamieh |
31 * @author jamieh |
32 * @library ../lib/ |
32 * @library ../lib |
33 * @build JavadocTester |
33 * @build JavadocTester taglets.Foo |
34 * @build TestTaglets |
|
35 * @build taglets.Foo |
|
36 * @run main TestTaglets |
34 * @run main TestTaglets |
37 */ |
35 */ |
38 |
36 |
39 public class TestTaglets extends JavadocTester { |
37 public class TestTaglets extends JavadocTester { |
40 |
38 |
41 //Javadoc arguments. |
39 public static void main(String... args) throws Exception { |
42 private static final String[] ARGS_4654308 = new String[] { |
40 TestTaglets tester = new TestTaglets(); |
43 "-d", "4654308", "-tagletpath", SRC_DIR, "-taglet", "taglets.Foo", |
41 tester.runTests(); |
44 "-sourcepath", SRC_DIR, SRC_DIR + "/C.java" |
42 } |
45 }; |
|
46 |
43 |
47 private static final String[] ARGS_4767038 = new String[] { |
44 @Test |
48 "-d", "4767038", "-sourcepath", SRC_DIR, SRC_DIR + "/Parent.java", |
45 void test_4654308() { |
49 SRC_DIR + "/Child.java" |
46 javadoc("-d", "out-4654308", |
50 }; |
47 "-tagletpath", testSrc, // TODO: probably does no good |
|
48 "-taglet", "taglets.Foo", |
|
49 "-sourcepath", testSrc, |
|
50 testSrc("C.java")); |
|
51 checkExit(Exit.OK); |
51 |
52 |
52 //Input for string search tests. |
53 checkOutput("C.html", true, |
53 private static final String[][] TEST_4654308 = new String[][] { |
54 "<span class=\"simpleTagLabel\">Foo:</span></dt>" |
54 { "C.html", "<span class=\"simpleTagLabel\">Foo:</span></dt>" + |
55 + "<dd>my only method is <a href=\"C.html#method--\"><code>here" |
55 "<dd>my only method is <a href=\"C.html#method--\"><code>here" + |
56 + "</code></a></dd></dl>"); |
56 "</code></a></dd></dl>"} |
57 } |
57 }; |
|
58 |
58 |
59 private static final String[][] TEST_4767038 = new String[][] { |
59 @Test |
60 { "Child.html", |
60 void test_4767038() { |
61 "This is the first sentence."} |
61 javadoc("-d", "out-4767038", |
62 }; |
62 "-sourcepath", testSrc, |
|
63 testSrc("Parent.java"), testSrc("Child.java")); |
|
64 checkExit(Exit.OK); |
63 |
65 |
64 |
66 checkOutput("Child.html", true, |
65 /** |
67 "This is the first sentence."); |
66 * The entry point of the test. |
|
67 * @param args the array of command line arguments. |
|
68 */ |
|
69 public static void main(String[] args) { |
|
70 TestTaglets tester = new TestTaglets(); |
|
71 tester.run(ARGS_4654308, TEST_4654308, NO_TEST); |
|
72 tester.printSummary(); |
|
73 tester = new TestTaglets(); |
|
74 tester.run(ARGS_4767038, TEST_4767038, NO_TEST); |
|
75 tester.printSummary(); |
|
76 } |
68 } |
77 } |
69 } |