test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java

Wed, 11 Sep 2013 14:50:11 -0700

author
bpatel
date
Wed, 11 Sep 2013 14:50:11 -0700
changeset 2023
cf37c3775397
parent 1999
7993cfab8610
child 2147
130b8c0e570e
permissions
-rw-r--r--

8015496: Information that package is deprecated is missing in profiles view
Reviewed-by: jjg

jjg@1999 1 /*
jjg@1999 2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
jjg@1999 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
jjg@1999 4 *
jjg@1999 5 * This code is free software; you can redistribute it and/or modify it
jjg@1999 6 * under the terms of the GNU General Public License version 2 only, as
jjg@1999 7 * published by the Free Software Foundation.
jjg@1999 8 *
jjg@1999 9 * This code is distributed in the hope that it will be useful, but WITHOUT
jjg@1999 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
jjg@1999 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
jjg@1999 12 * version 2 for more details (a copy is included in the LICENSE file that
jjg@1999 13 * accompanied this code).
jjg@1999 14 *
jjg@1999 15 * You should have received a copy of the GNU General Public License version
jjg@1999 16 * 2 along with this work; if not, write to the Free Software Foundation,
jjg@1999 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
jjg@1999 18 *
jjg@1999 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
jjg@1999 20 * or visit www.oracle.com if you need additional information or have any
jjg@1999 21 * questions.
jjg@1999 22 */
jjg@1999 23
jjg@1999 24 /*
jjg@1999 25 * @test
bpatel@2023 26 * @bug 8006124 8009684 8015663 8015496
jjg@1999 27 * @summary Test javadoc options support for profiles.
jjg@1999 28 * @author Evgeniya Stepanova
jjg@1999 29 * @library ../lib/
jjg@1999 30 * @build JavadocTester TestProfilesConfiguration
jjg@1999 31 * @run main TestProfilesConfiguration
jjg@1999 32 */
jjg@1999 33 public class TestProfilesConfiguration extends JavadocTester {
jjg@1999 34
jjg@1999 35 //Test information.
jjg@1999 36 private static final String BUG_ID = "8006124-8009684";
jjg@1999 37 private static final String PROFILE_CONFIGURATION_BUG_ID = BUG_ID + "-3";
bpatel@2023 38 private static final String NODEPR_NOPKGS_BUG_ID = BUG_ID + "-4";
jjg@1999 39 //Javadoc arguments.
jjg@1999 40 private static final String[] ARGS3 = new String[]{
jjg@1999 41 "-d", PROFILE_CONFIGURATION_BUG_ID, "-sourcepath", SRC_DIR, "-nocomment",
jjg@1999 42 "-keywords", "-Xprofilespath", SRC_DIR + FS + "profile-rtjar-includes.txt",
jjg@1999 43 "-doctitle", "Simple doctitle", "-use", "pkg3", "pkg1", "pkg2", "pkg4",
jjg@1999 44 "pkg5", "-packagesheader", "Simple packages header","pkgDeprecated"
jjg@1999 45 };
bpatel@2023 46 private static final String[] ARGS4 = new String[]{
bpatel@2023 47 "-d", NODEPR_NOPKGS_BUG_ID, "-sourcepath", SRC_DIR, "-nocomment", "-nodeprecated",
bpatel@2023 48 "-keywords", "-Xprofilespath", SRC_DIR + FS + "profile-rtjar-includes-nopkgs.txt",
bpatel@2023 49 "-doctitle", "Simple doctitle", "-use", "-packagesheader", "Simple packages header",
bpatel@2023 50 "pkg1", "pkg2", "pkg3", "pkg4", "pkg5", "pkgDeprecated"
bpatel@2023 51 };
bpatel@2023 52 private static final String[][] NODEPR_NOPKGS_TEST = {
bpatel@2023 53 {NODEPR_NOPKGS_BUG_ID + FS + "overview-summary.html",
bpatel@2023 54 "<ul>" + NL + "<li><a href=\"compact2-summary.html\" target=\"classFrame\">" +
bpatel@2023 55 "compact2</a></li>" + NL + "<li><a href=\"compact3-summary.html\" target=\"" +
bpatel@2023 56 "classFrame\">compact3</a></li>" + NL + "</ul>"
bpatel@2023 57 },
bpatel@2023 58 {NODEPR_NOPKGS_BUG_ID + FS + "profile-overview-frame.html",
bpatel@2023 59 "<ul title=\"Profiles\">" + NL + "<li><a href=\"compact2-frame.html\" target=\"packageListFrame\">" +
bpatel@2023 60 "compact2</a></li>" + NL + "<li><a href=\"compact3-frame.html\" target=\"" +
bpatel@2023 61 "packageListFrame\">compact3</a></li>" + NL + "</ul>"
bpatel@2023 62 }
bpatel@2023 63 };
bpatel@2023 64 private static final String[][] NODEPR_NOPKGS_NEGATED_TEST = {
bpatel@2023 65 {NODEPR_NOPKGS_BUG_ID + FS + "overview-summary.html",
bpatel@2023 66 "compact1"
bpatel@2023 67 }
bpatel@2023 68 };
bpatel@2023 69
jjg@1999 70 private static final String[][] PROFILES_CONFIGURATION_TEST = {
jjg@1999 71 //-use option test string fo profile view page
jjg@1999 72 {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html","<li>Use</li>"
jjg@1999 73 },
jjg@1999 74 //-doctitle option test string
jjg@1999 75 {PROFILE_CONFIGURATION_BUG_ID + FS + "overview-summary.html",
jjg@1999 76 "<div class=\"header\">" + NL + "<h1 class=\"title\">Simple doctitle</h1>"
jjg@1999 77 },
jjg@1999 78 //-packagesheader option test string fo profiles
jjg@1999 79 {PROFILE_CONFIGURATION_BUG_ID + FS + "profile-overview-frame.html",
jjg@1999 80 "<h1 title=\"Simple packages header\" class=\"bar\">Simple packages header</h1>"
jjg@1999 81 },
jjg@1999 82 //-keywords option test string for profiles
jjg@1999 83 {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html",
jjg@1999 84 "<meta name=\"keywords\" content=\"compact1 profile\">"
bpatel@2023 85 },
bpatel@2023 86 //Deprecated information on a package
bpatel@2023 87 {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html",
bpatel@2023 88 "<h3><a href=\"pkgDeprecated/compact1-package-summary.html\" target=\"" +
bpatel@2023 89 "classFrame\">pkgDeprecated</a></h3>" + NL + "<div class=\"deprecatedContent\">" +
bpatel@2023 90 "<span class=\"strong\">Deprecated.</span></div>"
jjg@1999 91 }
jjg@1999 92 };
jjg@1999 93 private static final String[][] PROFILES_CONFIGURATION_NEGATED_TEST = {
jjg@1999 94 //-nocomments option test string
jjg@1999 95 {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html",
jjg@1999 96 "<div class=\"block\"><i>Class1Pkg2.</i></div>"
jjg@1999 97 }
jjg@1999 98 };
jjg@1999 99
jjg@1999 100 /**
jjg@1999 101 * The entry point of the test.
jjg@1999 102 *
jjg@1999 103 * @param args the array of command line arguments.
jjg@1999 104 */
jjg@1999 105 public static void main(String[] args) {
jjg@1999 106 TestProfilesConfiguration tester = new TestProfilesConfiguration();
jjg@1999 107 run(tester, ARGS3, PROFILES_CONFIGURATION_TEST,
jjg@1999 108 PROFILES_CONFIGURATION_NEGATED_TEST);
bpatel@2023 109 run(tester, ARGS4, NODEPR_NOPKGS_TEST,
bpatel@2023 110 NODEPR_NOPKGS_NEGATED_TEST);
jjg@1999 111 tester.printSummary();
jjg@1999 112 }
jjg@1999 113
jjg@1999 114 /**
jjg@1999 115 * {@inheritDoc}
jjg@1999 116 */
jjg@1999 117 public String getBugId() {
jjg@1999 118 return BUG_ID;
jjg@1999 119 }
jjg@1999 120
jjg@1999 121 /**
jjg@1999 122 * {@inheritDoc}
jjg@1999 123 */
jjg@1999 124 public String getBugName() {
jjg@1999 125 return getClass().getName();
jjg@1999 126 }
jjg@1999 127 }

mercurial