langtools/test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java
author akulyakh
Thu, 21 May 2015 11:41:04 -0700
changeset 30730 d3ce7619db2c
parent 24399 af1a0220d0fa
permissions -rw-r--r--
8076543: Add @modules as needed to the langtools tests Reviewed-by: jjg, shurailine
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     1
/*
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 24399
diff changeset
     2
 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     4
 *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     7
 * published by the Free Software Foundation.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     8
 *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    13
 * accompanied this code).
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    14
 *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    18
 *
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    21
 * questions.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    22
 */
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    23
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    24
/*
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    25
 * @test
21478
fa4c7cda1b41 8026567: Use meaningful style names for strong and italic styles.
bpatel
parents: 19937
diff changeset
    26
 * @bug      8006124 8009684 8015663 8015496 8026567
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    27
 * @summary  Test javadoc options support for profiles.
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    28
 * @author   Evgeniya Stepanova
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    29
 * @library  ../lib
30730
d3ce7619db2c 8076543: Add @modules as needed to the langtools tests
akulyakh
parents: 24399
diff changeset
    30
 * @modules jdk.javadoc
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    31
 * @build    JavadocTester
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    32
 * @run main TestProfilesConfiguration
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    33
 */
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    34
public class TestProfilesConfiguration extends JavadocTester {
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
    35
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    36
    public static void main(String... args) throws Exception {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    37
        TestProfilesConfiguration tester = new TestProfilesConfiguration();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    38
        tester.runTests();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    39
//        tester.run(ARGS3, PROFILES_CONFIGURATION_TEST, PROFILES_CONFIGURATION_NEGATED_TEST);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    40
//        tester.run(ARGS4, NODEPR_NOPKGS_TEST, NODEPR_NOPKGS_NEGATED_TEST);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    41
//        tester.printSummary();
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    42
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    43
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    44
    @Test
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    45
    void testProfiles() {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    46
        javadoc("-d", "out-profiles",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    47
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    48
                "-nocomment",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    49
                "-keywords",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    50
                "-Xprofilespath", testSrc("profile-rtjar-includes.txt"),
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    51
                "-doctitle", "Simple doctitle",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    52
                "-use",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    53
                "-packagesheader", "Simple packages header",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    54
                "pkg3", "pkg1", "pkg2", "pkg4", "pkg5", "pkgDeprecated");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    55
        checkExit(Exit.OK);
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    56
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    57
        checkOutput("compact1-summary.html", true,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    58
                //-use option test string fo profile view page
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    59
                "<li>Use</li>",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    60
                // -keywords option test string for profiles
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    61
                "<meta name=\"keywords\" content=\"compact1 profile\">",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    62
                // Deprecated information on a package
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    63
                "<h3><a href=\"pkgDeprecated/compact1-package-summary.html\" target=\""
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    64
                + "classFrame\">pkgDeprecated</a></h3>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    65
                + "<div class=\"deprecatedContent\">"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    66
                + "<span class=\"deprecatedLabel\">Deprecated.</span></div>"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    67
        );
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    68
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    69
        //-nocomments option test string
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    70
        checkOutput("compact1-summary.html", false,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    71
                "<div class=\"block\"><i>Class1Pkg2.</i></div>"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    72
        );
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    73
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    74
        // -doctitle option test string
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    75
        checkOutput("overview-summary.html", true,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    76
                "<div class=\"header\">\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    77
                + "<h1 class=\"title\">Simple doctitle</h1>"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    78
        );
19937
7dacecdfbad4 8015496: Information that package is deprecated is missing in profiles view
bpatel
parents: 19913
diff changeset
    79
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    80
        // -packagesheader option test string fo profiles
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    81
        checkOutput("profile-overview-frame.html", true,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    82
                "<h1 title=\"Simple packages header\" class=\"bar\">Simple packages header</h1>"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    83
        );
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    84
    }
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    85
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    86
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    87
    @Test
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    88
    void testNoDeprNoPackages() {
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    89
        javadoc("-d", "out-noDeprNoPackages",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    90
                "-sourcepath", testSrc,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    91
                "-nocomment",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    92
                "-nodeprecated",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    93
                "-keywords",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    94
                "-Xprofilespath", testSrc("profile-rtjar-includes-nopkgs.txt"),
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    95
                "-doctitle", "Simple doctitle",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    96
                "-use",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    97
                "-packagesheader", "Simple packages header",
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    98
                "pkg1", "pkg2", "pkg3", "pkg4", "pkg5", "pkgDeprecated");
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
    99
        checkExit(Exit.OK);
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   100
24399
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   101
        checkOutput("overview-summary.html", true,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   102
                "<ul>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   103
                + "<li><a href=\"compact2-summary.html\" target=\"classFrame\">"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   104
                + "compact2</a></li>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   105
                + "<li><a href=\"compact3-summary.html\" target=\""
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   106
                + "classFrame\">compact3</a></li>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   107
                + "</ul>"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   108
        );
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   109
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   110
        checkOutput("profile-overview-frame.html", true,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   111
                "<ul title=\"Profiles\">\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   112
                + "<li><a href=\"compact2-frame.html\" target=\"packageListFrame\">"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   113
                + "compact2</a></li>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   114
                + "<li><a href=\"compact3-frame.html\" target=\""
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   115
                + "packageListFrame\">compact3</a></li>\n"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   116
                + "</ul>"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   117
        );
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   118
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   119
        checkOutput("overview-summary.html", false,
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   120
                "compact1"
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   121
        );
af1a0220d0fa 8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents: 24072
diff changeset
   122
19913
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   123
    }
2adc7be8a60b 8015663: Need to supply tests to provide javadoc for profiles support code coverage
jjg
parents:
diff changeset
   124
}