author | jjg |
Fri, 21 Dec 2018 10:38:33 -0800 | |
changeset 53097 | 2e82ca64b25d |
parent 48759 | ffa68af7da87 |
child 53164 | f2140eebd91b |
permissions | -rw-r--r-- |
40605 | 1 |
/* |
48552
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
2 |
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
40605 | 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 |
|
48552
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
26 |
* @bug 8157349 8185985 8194953 |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
27 |
* @summary test copy of doc-files, and its contents for HTML meta content. |
53097 | 28 |
* @library ../../lib |
40605 | 29 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
53097 | 30 |
* @build javadoc.tester.* |
40605 | 31 |
* @run main TestCopyFiles |
32 |
*/ |
|
33 |
||
53097 | 34 |
import javadoc.tester.JavadocTester; |
35 |
||
40605 | 36 |
public class TestCopyFiles extends JavadocTester { |
37 |
||
38 |
public static void main(String... args) throws Exception { |
|
39 |
TestCopyFiles tester = new TestCopyFiles(); |
|
40 |
tester.runTests(); |
|
41 |
} |
|
42 |
||
43 |
@Test |
|
53097 | 44 |
public void testDocFilesInModulePackages() { |
40605 | 45 |
javadoc("-d", "modules-out", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
46 |
"-top", "phi-TOP-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
47 |
"-bottom", "phi-BOTTOM-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
48 |
"-header", "phi-HEADER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
49 |
"-footer", "phi-FOOTER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
50 |
"-windowtitle", "phi-WINDOW-TITLE-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
51 |
"--module-source-path", testSrc("modules"), |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
52 |
"--module", "acme.mdle"); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
53 |
checkExit(Exit.OK); |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
54 |
checkOrder("acme.mdle/p/doc-files/inpackage.html", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
55 |
"\"Hello World\" (phi-WINDOW-TITLE-phi)", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
56 |
"phi-TOP-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
57 |
// check top navbar |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
58 |
"<a href=\"../../module-summary.html\">Module</a>", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
59 |
"<a href=\"../package-summary.html\">Package</a>", |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
60 |
"<a href=\"../../../overview-tree.html\">Tree</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
61 |
"<a href=\"../../../deprecated-list.html\">Deprecated</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
62 |
"<a href=\"../../../index-all.html\">Index</a>", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
63 |
"phi-HEADER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
64 |
"In a named module acme.module and named package " |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
65 |
+ "<a href=\"../package-summary.html\"><code>p</code></a>.", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
66 |
"\"simpleTagLabel\">Since:</", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
67 |
"1940", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
68 |
// check bottom navbar |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
69 |
"<a href=\"../../module-summary.html\">Module</a>", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
70 |
"<a href=\"../package-summary.html\">Package</a>", |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
71 |
"<a href=\"../../../overview-tree.html\">Tree</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
72 |
"<a href=\"../../../deprecated-list.html\">Deprecated</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
73 |
"<a href=\"../../../index-all.html\">Index</a>", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
74 |
"phi-FOOTER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
75 |
"phi-BOTTOM-phi" |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
76 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
77 |
} |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
78 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
79 |
@Test |
53097 | 80 |
public void testDocFilesInMultiModulePackagesWithRecursiveCopy() { |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
81 |
javadoc("-d", "multi-modules-out-recursive", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
82 |
"-docfilessubdirs", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
83 |
"-top", "phi-TOP-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
84 |
"-bottom", "phi-BOTTOM-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
85 |
"-header", "phi-HEADER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
86 |
"-footer", "phi-FOOTER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
87 |
"-windowtitle", "phi-WINDOW-TITLE-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
88 |
"--module-source-path", testSrc("modules"), |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
89 |
"--module", "acme.mdle,acme2.mdle"); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
90 |
checkExit(Exit.OK); |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
91 |
checkOrder("acme.mdle/p/doc-files/inpackage.html", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
92 |
"\"Hello World\" (phi-WINDOW-TITLE-phi)", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
93 |
"phi-TOP-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
94 |
// check top navbar |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
95 |
"<a href=\"../../module-summary.html\">Module</a>", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
96 |
"<a href=\"../package-summary.html\">Package</a>", |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
97 |
"<a href=\"../../../overview-tree.html\">Tree</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
98 |
"<a href=\"../../../deprecated-list.html\">Deprecated</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
99 |
"<a href=\"../../../index-all.html\">Index</a>", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
100 |
"phi-HEADER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
101 |
"In a named module acme.module and named package " |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
102 |
+ "<a href=\"../package-summary.html\"><code>p</code></a>.", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
103 |
"\"simpleTagLabel\">Since:</", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
104 |
"1940", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
105 |
// check bottom navbar |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
106 |
"<a href=\"../../module-summary.html\">Module</a>", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
107 |
"<a href=\"../package-summary.html\">Package</a>", |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
108 |
"<a href=\"../../../overview-tree.html\">Tree</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
109 |
"<a href=\"../../../deprecated-list.html\">Deprecated</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
110 |
"<a href=\"../../../index-all.html\">Index</a>", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
111 |
"phi-FOOTER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
112 |
"phi-BOTTOM-phi" |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
113 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
114 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
115 |
// check the bottom most doc file |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
116 |
checkOrder("acme2.mdle/p2/doc-files/sub-dir/sub-dir-1/SubSubReadme.html", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
117 |
"SubSubReadme (phi-WINDOW-TITLE-phi)", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
118 |
"phi-TOP-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
119 |
// check top navbar |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
120 |
"<a href=\"../../../../module-summary.html\">Module</a>", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
121 |
"<a href=\"../../../package-summary.html\">Package</a>", |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
122 |
"<a href=\"../../../../../overview-tree.html\">Tree</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
123 |
"<a href=\"../../../../../deprecated-list.html\">Deprecated</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
124 |
"<a href=\"../../../../../index-all.html\">Index</a>", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
125 |
"phi-HEADER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
126 |
"SubSubReadme.html at third level of doc-file directory.", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
127 |
// check bottom navbar |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
128 |
"<a href=\"../../../../module-summary.html\">Module</a>", |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
129 |
"<a href=\"../../../package-summary.html\">Package</a>", |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
130 |
"<a href=\"../../../../../overview-tree.html\">Tree</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
131 |
"<a href=\"../../../../../deprecated-list.html\">Deprecated</a>", |
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
132 |
"<a href=\"../../../../../index-all.html\">Index</a>", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
133 |
"phi-FOOTER-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
134 |
"phi-BOTTOM-phi" |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
135 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
136 |
} |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
137 |
|
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
138 |
@Test |
53097 | 139 |
public void testDocFilesInModulePackagesWithRecursiveCopy() { |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
140 |
javadoc("-d", "modules-out-recursive", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
141 |
"-docfilessubdirs", |
40605 | 142 |
"--module-source-path", testSrc("modules"), |
143 |
"--module", "acme.mdle"); |
|
144 |
checkExit(Exit.OK); |
|
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
145 |
checkOutput("acme.mdle/p/doc-files/inpackage.html", true, |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
146 |
"In a named module acme.module and named package " |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
147 |
+ "<a href=\"../package-summary.html\"><code>p</code></a>." |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
148 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
149 |
} |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
150 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
151 |
@Test |
53097 | 152 |
public void testDocFilesInModulePackagesWithRecursiveCopyWithExclusion() { |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
153 |
javadoc("-d", "modules-out-recursive-with-exclusion", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
154 |
"-docfilessubdirs", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
155 |
"-excludedocfilessubdir", "sub-dir", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
156 |
"--module-source-path", testSrc("modules"), |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
157 |
"--module", "acme.mdle"); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
158 |
checkExit(Exit.OK); |
48759
ffa68af7da87
8195795: Organize output files by module/package, not just package
jjg
parents:
48654
diff
changeset
|
159 |
checkOutput("acme.mdle/p/doc-files/inpackage.html", true, |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
160 |
"In a named module acme.module and named package " |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
48552
diff
changeset
|
161 |
+ "<a href=\"../package-summary.html\"><code>p</code></a>." |
40605 | 162 |
); |
163 |
} |
|
164 |
||
165 |
@Test |
|
53097 | 166 |
public void testDocFilesInPackages() { |
40605 | 167 |
javadoc("-d", "packages-out", |
168 |
"-sourcepath", testSrc("packages"), |
|
169 |
"p1"); |
|
170 |
checkExit(Exit.OK); |
|
171 |
checkOutput("p1/doc-files/inpackage.html", true, |
|
172 |
"A named package in an unnamed module" |
|
173 |
); |
|
174 |
} |
|
175 |
||
176 |
@Test |
|
53097 | 177 |
public void testDocFilesInPackagesWithRecursiveCopy() { |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
178 |
javadoc("-d", "packages-out-recursive", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
179 |
"-docfilessubdirs", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
180 |
"-sourcepath", testSrc("packages"), |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
181 |
"p1"); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
182 |
checkExit(Exit.OK); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
183 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
184 |
checkOutput("p1/doc-files/inpackage.html", true, |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
185 |
"A named package in an unnamed module" |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
186 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
187 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
188 |
checkOutput("p1/doc-files/sub-dir/SubReadme.html", true, |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
189 |
"<title>SubReadme</title>", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
190 |
"SubReadme.html at second level of doc-file directory." |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
191 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
192 |
} |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
193 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
194 |
@Test |
53097 | 195 |
public void testDocFilesInPackagesWithRecursiveCopyWithExclusion() { |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
196 |
javadoc("-d", "packages-out-recursive-with-exclusion", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
197 |
"-docfilessubdirs", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
198 |
"-excludedocfilessubdir", "sub-dir", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
199 |
"-sourcepath", testSrc("packages"), |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
200 |
"p1"); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
201 |
checkExit(Exit.OK); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
202 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
203 |
checkOutput("p1/doc-files/inpackage.html", true, |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
204 |
"A named package in an unnamed module" |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
205 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
206 |
} |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
207 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
208 |
@Test |
53097 | 209 |
public void testDocFilesInUnnamedPackages() { |
40605 | 210 |
javadoc("-d", "unnamed-out", |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
211 |
"-windowtitle", "phi-WINDOW-TITLE-phi", |
40605 | 212 |
"-sourcepath", testSrc("unnamed"), |
213 |
testSrc("unnamed/Foo.java") |
|
214 |
); |
|
215 |
checkExit(Exit.OK); |
|
216 |
checkOutput("doc-files/inpackage.html", true, |
|
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
217 |
"<title>(phi-WINDOW-TITLE-phi)</title>\n", |
40605 | 218 |
"In an unnamed package" |
219 |
); |
|
220 |
} |
|
221 |
||
222 |
@Test |
|
53097 | 223 |
public void testDocFilesInUnnamedPackagesWithRecursiveCopy() { |
48029
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
224 |
javadoc("-d", "unnamed-out-recursive", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
225 |
"-docfilessubdirs", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
226 |
"-windowtitle", "phi-WINDOW-TITLE-phi", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
227 |
"-sourcepath", testSrc("unnamed"), |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
228 |
testSrc("unnamed/Foo.java") |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
229 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
230 |
checkExit(Exit.OK); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
231 |
checkOutput("doc-files/inpackage.html", true, |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
232 |
"<title>(phi-WINDOW-TITLE-phi)</title>\n", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
233 |
"In an unnamed package" |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
234 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
235 |
checkOutput("doc-files/doc-file/SubReadme.html", true, |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
236 |
"<title>Beep Beep (phi-WINDOW-TITLE-phi)</title>\n", |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
237 |
"SubReadme.html at second level of doc-file directory for unnamed package." |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
238 |
); |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
239 |
} |
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
240 |
|
e9dab2492924
8185985: Html files in doc-files directories should be wrapped with standard header and footer
ksrini
parents:
47216
diff
changeset
|
241 |
@Test |
53097 | 242 |
public void testDocFilesInPackagesSource7() { |
40605 | 243 |
javadoc("-d", "packages-out-src7", |
244 |
"-source", "7", |
|
245 |
"-sourcepath", testSrc("packages"), |
|
246 |
"p1"); |
|
247 |
checkExit(Exit.OK); |
|
248 |
checkOutput("p1/doc-files/inpackage.html", true, |
|
249 |
"A named package in an unnamed module" |
|
250 |
); |
|
251 |
} |
|
252 |
||
253 |
@Test |
|
53097 | 254 |
public void testDocFilesInPackagesSource7UsingClassPath() { |
40605 | 255 |
javadoc("-d", "packages-out-src7-cp", |
256 |
"-source", "7", |
|
257 |
"-classpath", testSrc("packages"), |
|
258 |
"p1"); |
|
259 |
checkExit(Exit.OK); |
|
260 |
checkOutput("p1/doc-files/inpackage.html", true, |
|
261 |
"A named package in an unnamed module" |
|
262 |
); |
|
263 |
} |
|
48552
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
264 |
|
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
265 |
@Test |
53097 | 266 |
public void testCopyThrough() { |
48552
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
267 |
javadoc("-d", "copy", |
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
268 |
"-sourcepath", testSrc("packages"), |
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
269 |
"p2"); |
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
270 |
checkExit(Exit.OK); |
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
271 |
checkOutput("p2/doc-files/case1.html", true, "<!-- Generated by javadoc"); |
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
272 |
checkOutput("p2/doc-files/case2.html", false, "<!-- Generated by javadoc"); |
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
273 |
checkOutput("p2/doc-files/case3.html", false, "<!-- Generated by javadoc"); |
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
274 |
checkOutput("p2/doc-files/case4.html", false, "<!-- Generated by javadoc"); |
f94706337b07
8194953: doclet corrupts HTML files when adding navbar
ksrini
parents:
48029
diff
changeset
|
275 |
} |
40605 | 276 |
} |