author | jjg |
Tue, 22 Apr 2014 17:41:11 -0700 | |
changeset 24071 | b0845717434e |
parent 24065 | fc4022e50129 |
child 24072 | e7549dcbc4af |
permissions | -rw-r--r-- |
10 | 1 |
/* |
23971 | 2 |
* Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. |
10 | 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 |
* |
|
5520 | 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. |
|
10 | 22 |
*/ |
23 |
||
24 |
/* |
|
25 |
* @test |
|
26 |
* @bug 4369014 4851991 |
|
27 |
* @summary Determine if the docRoot inline tag works properly. |
|
28 |
* If docRoot performs as documented, the test passes. |
|
29 |
* Make sure that the docRoot tag works with the -bottom option. |
|
30 |
* @author jamieh |
|
31 |
* @library ../lib/ |
|
32 |
* @build JavadocTester |
|
33 |
* @build TestDocRootInlineTag |
|
34 |
* @run main TestDocRootInlineTag |
|
35 |
*/ |
|
36 |
||
37 |
public class TestDocRootInlineTag extends JavadocTester { |
|
38 |
||
39 |
private static final String BUG_ID = "4369014-4851991"; |
|
40 |
private static final String[][] TEST = { |
|
23971 | 41 |
{BUG_ID + "/TestDocRootTag.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
42 |
"<a href=\"http://www.java.sun.com/j2se/1.4/docs/api/java/io/File.html?is-external=true\" " + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
43 |
"title=\"class or interface in java.io\"><code>File</code></a>"}, |
23971 | 44 |
{BUG_ID + "/TestDocRootTag.html", |
10 | 45 |
"<a href=\"./glossary.html\">glossary</a>"}, |
23971 | 46 |
{BUG_ID + "/TestDocRootTag.html", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
47 |
"<a href=\"http://www.java.sun.com/j2se/1.4/docs/api/java/io/File.html?is-external=true\" " + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
48 |
"title=\"class or interface in java.io\"><code>Second File Link</code></a>"}, |
23971 | 49 |
{BUG_ID + "/TestDocRootTag.html", "The value of @docRoot is \"./\""}, |
50 |
{BUG_ID + "/index-all.html", "My package page is " + |
|
10 | 51 |
"<a href=\"./pkg/package-summary.html\">here</a>"} |
52 |
}; |
|
53 |
private static final String[] ARGS = |
|
54 |
new String[] { |
|
55 |
"-bottom", "The value of @docRoot is \"{@docRoot}\"", |
|
56 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, |
|
57 |
"-linkoffline", "http://www.java.sun.com/j2se/1.4/docs/api", |
|
23971 | 58 |
SRC_DIR, SRC_DIR + "/TestDocRootTag.java", "pkg" |
10 | 59 |
}; |
60 |
||
61 |
/** |
|
62 |
* The entry point of the test. |
|
63 |
* @param args the array of command line arguments. |
|
64 |
*/ |
|
65 |
public static void main(String[] args) { |
|
66 |
TestDocRootInlineTag tester = new TestDocRootInlineTag(); |
|
24071 | 67 |
tester.run(ARGS, TEST, NO_TEST); |
10 | 68 |
tester.printSummary(); |
69 |
} |
|
70 |
||
71 |
/** |
|
72 |
* {@inheritDoc} |
|
73 |
*/ |
|
74 |
public String getBugId() { |
|
75 |
return BUG_ID; |
|
76 |
} |
|
77 |
||
78 |
/** |
|
79 |
* {@inheritDoc} |
|
80 |
*/ |
|
81 |
public String getBugName() { |
|
82 |
return getClass().getName(); |
|
83 |
} |
|
84 |
} |