test/com/sun/javadoc/testTaglets/TestTaglets.java

changeset 1
9a66ca7c79fa
child 401
dd98acd9f717
equal deleted inserted replaced
-1:000000000000 1:9a66ca7c79fa
1 /*
2 * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 * have any questions.
22 */
23
24 /*
25 * @test
26 * @bug 4654308 4767038
27 * @summary Use a Taglet and include some inline tags such as {@link}. The
28 * inline tags should be interpreted properly.
29 * Run Javadoc on some sample source that uses {@inheritDoc}. Make
30 * sure that only the first sentence shows up in the summary table.
31 * @author jamieh
32 * @library ../lib/
33 * @build JavadocTester
34 * @build TestTaglets
35 * @build taglets.Foo
36 * @run main TestTaglets
37 */
38
39 public class TestTaglets extends JavadocTester {
40
41 //Test information.
42 private static final String BUG_ID = "4654308-4767038";
43 private static final String OUTPUT_DIR = BUG_ID;
44
45 //Javadoc arguments.
46 private static final String[] ARGS_4654308 = new String[] {
47 "-d", "4654308", "-tagletpath", SRC_DIR, "-taglet", "taglets.Foo",
48 "-sourcepath", SRC_DIR, SRC_DIR + FS + "C.java"
49 };
50
51 private static final String[] ARGS_4767038 = new String[] {
52 "-d", "4767038", "-sourcepath", SRC_DIR, SRC_DIR + FS + "Parent.java",
53 SRC_DIR + FS + "Child.java"
54 };
55
56 //Input for string search tests.
57 private static final String[][] TEST_4654308 = new String[][] {
58 {"4654308" + FS + "C.html", "<B>Foo:</B><DD>my only method is " +
59 "<A HREF=\"C.html#method()\"><CODE>here</CODE></A>"}
60 };
61 private static final String[][] NEGATED_TEST_4654308 = NO_TEST;
62
63 private static final String[][] TEST_4767038 = new String[][] {
64 {"4767038" + FS + "Child.html",
65 "&nbsp;This is the first sentence.</TD>"}
66 };
67 private static final String[][] NEGATED_TEST_4767038 = NO_TEST;
68
69
70 /**
71 * The entry point of the test.
72 * @param args the array of command line arguments.
73 */
74 public static void main(String[] args) {
75 TestTaglets tester = new TestTaglets();
76 run(tester, ARGS_4654308, TEST_4654308, NEGATED_TEST_4654308);
77 tester.printSummary();
78 tester = new TestTaglets();
79 run(tester, ARGS_4767038, TEST_4767038, NEGATED_TEST_4767038);
80 tester.printSummary();
81 }
82
83 /**
84 * {@inheritDoc}
85 */
86 public String getBugId() {
87 return BUG_ID;
88 }
89
90 /**
91 * {@inheritDoc}
92 */
93 public String getBugName() {
94 return getClass().getName();
95 }
96 }

mercurial