test/langtools/jdk/javadoc/doclet/testCopyFiles/TestCopyFiles.java
author jjg
Fri, 21 Dec 2018 10:38:33 -0800
changeset 53097 2e82ca64b25d
parent 48759 ffa68af7da87
child 53164 f2140eebd91b
permissions -rw-r--r--
8215516: Move JavadocTester to a named package Reviewed-by: hannesw
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
     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
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
     4
 *
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
     7
 * published by the Free Software Foundation.
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
     8
 *
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    13
 * accompanied this code).
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    14
 *
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    18
 *
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    21
 * questions.
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    22
 */
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    23
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    24
/*
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    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
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
    28
 * @library  ../../lib
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    29
 * @modules jdk.javadoc/jdk.javadoc.internal.tool
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
    30
 * @build    javadoc.tester.*
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    31
 * @run main TestCopyFiles
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    32
 */
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    33
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
    34
import javadoc.tester.JavadocTester;
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
    35
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    36
public class TestCopyFiles extends JavadocTester {
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    37
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    38
    public static void main(String... args) throws Exception {
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    39
        TestCopyFiles tester = new TestCopyFiles();
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    40
        tester.runTests();
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    41
    }
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    42
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    43
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
    44
    public void testDocFilesInModulePackages() {
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
    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
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
    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
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   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
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   142
                "--module-source-path", testSrc("modules"),
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   143
                "--module", "acme.mdle");
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   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
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   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
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   162
        );
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   163
    }
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   164
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   165
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   166
    public void testDocFilesInPackages() {
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   167
        javadoc("-d", "packages-out",
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   168
                "-sourcepath", testSrc("packages"),
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   169
                "p1");
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   170
        checkExit(Exit.OK);
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   171
        checkOutput("p1/doc-files/inpackage.html", true,
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   172
                "A named package in an unnamed module"
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   173
        );
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   174
    }
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   175
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   176
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   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
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   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
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   209
    public void testDocFilesInUnnamedPackages() {
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   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
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   212
                "-sourcepath", testSrc("unnamed"),
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   213
                testSrc("unnamed/Foo.java")
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   214
        );
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   215
        checkExit(Exit.OK);
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   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
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   218
                "In an unnamed package"
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   219
        );
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   220
    }
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   221
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   222
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   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
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   242
    public void testDocFilesInPackagesSource7() {
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   243
        javadoc("-d", "packages-out-src7",
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   244
                "-source", "7",
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   245
                "-sourcepath", testSrc("packages"),
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   246
                "p1");
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   247
        checkExit(Exit.OK);
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   248
        checkOutput("p1/doc-files/inpackage.html", true,
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   249
                "A named package in an unnamed module"
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   250
        );
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   251
    }
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   252
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   253
    @Test
53097
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   254
    public void testDocFilesInPackagesSource7UsingClassPath() {
40605
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   255
        javadoc("-d", "packages-out-src7-cp",
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   256
                "-source", "7",
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   257
                "-classpath", testSrc("packages"),
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   258
                "p1");
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   259
        checkExit(Exit.OK);
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   260
        checkOutput("p1/doc-files/inpackage.html", true,
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   261
                "A named package in an unnamed module"
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   262
        );
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   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
2e82ca64b25d 8215516: Move JavadocTester to a named package
jjg
parents: 48759
diff changeset
   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
926c13175b67 8157349: Missing doc-files in javadoc documentation
ksrini
parents:
diff changeset
   276
}