author | jjg |
Fri, 21 Dec 2018 10:38:33 -0800 | |
changeset 53097 | 2e82ca64b25d |
parent 49952 | a6224ea48b66 |
permissions | -rw-r--r-- |
44388 | 1 |
/* |
49952
a6224ea48b66
8201817: Taglet.init should be called with the "primary" doclet
jjg
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
44388 | 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
49952
a6224ea48b66
8201817: Taglet.init should be called with the "primary" doclet
jjg
parents:
47216
diff
changeset
|
26 |
* @bug 8176836 8201817 |
44388 | 27 |
* @summary Provide Taglet with context |
53097 | 28 |
* @library ../../lib |
44388 | 29 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
53097 | 30 |
* @build javadoc.tester.* InfoTaglet |
44388 | 31 |
* @run main TestUserTaglet |
32 |
*/ |
|
33 |
||
53097 | 34 |
import javadoc.tester.JavadocTester; |
35 |
||
44388 | 36 |
public class TestUserTaglet extends JavadocTester { |
37 |
||
38 |
public static void main(String... args) throws Exception { |
|
39 |
TestUserTaglet tester = new TestUserTaglet(); |
|
40 |
tester.runTests(); |
|
41 |
} |
|
42 |
||
43 |
@Test |
|
53097 | 44 |
public void test() { |
44388 | 45 |
javadoc("-d", "out", |
46 |
"-sourcepath", testSrc, |
|
47 |
"-tagletpath", System.getProperty("test.class.path"), |
|
48 |
"-taglet", "InfoTaglet", |
|
49 |
"pkg"); |
|
50 |
checkExit(Exit.OK); |
|
51 |
||
52 |
// The following checks verify that information was successfully |
|
53 |
// derived from the context information available to the taglet. |
|
54 |
checkOutput("pkg/C.html", true, |
|
55 |
"<li>Element: CLASS C", |
|
56 |
"<li>Element supertypes: [java.lang.Object]", |
|
49952
a6224ea48b66
8201817: Taglet.init should be called with the "primary" doclet
jjg
parents:
47216
diff
changeset
|
57 |
"<li>Doclet: class jdk.javadoc.doclet.StandardDoclet" |
44388 | 58 |
); |
59 |
} |
|
60 |
} |