jjg@1999: /* jjg@1999: * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. jjg@1999: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jjg@1999: * jjg@1999: * This code is free software; you can redistribute it and/or modify it jjg@1999: * under the terms of the GNU General Public License version 2 only, as jjg@1999: * published by the Free Software Foundation. jjg@1999: * jjg@1999: * This code is distributed in the hope that it will be useful, but WITHOUT jjg@1999: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jjg@1999: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jjg@1999: * version 2 for more details (a copy is included in the LICENSE file that jjg@1999: * accompanied this code). jjg@1999: * jjg@1999: * You should have received a copy of the GNU General Public License version jjg@1999: * 2 along with this work; if not, write to the Free Software Foundation, jjg@1999: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jjg@1999: * jjg@1999: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jjg@1999: * or visit www.oracle.com if you need additional information or have any jjg@1999: * questions. jjg@1999: */ jjg@1999: jjg@1999: /* jjg@1999: * @test bpatel@2023: * @bug 8006124 8009684 8015663 8015496 jjg@1999: * @summary Test javadoc options support for profiles. jjg@1999: * @author Evgeniya Stepanova jjg@1999: * @library ../lib/ jjg@1999: * @build JavadocTester TestProfilesConfiguration jjg@1999: * @run main TestProfilesConfiguration jjg@1999: */ jjg@1999: public class TestProfilesConfiguration extends JavadocTester { jjg@1999: jjg@1999: //Test information. jjg@1999: private static final String BUG_ID = "8006124-8009684"; jjg@1999: private static final String PROFILE_CONFIGURATION_BUG_ID = BUG_ID + "-3"; bpatel@2023: private static final String NODEPR_NOPKGS_BUG_ID = BUG_ID + "-4"; jjg@1999: //Javadoc arguments. jjg@1999: private static final String[] ARGS3 = new String[]{ jjg@1999: "-d", PROFILE_CONFIGURATION_BUG_ID, "-sourcepath", SRC_DIR, "-nocomment", jjg@1999: "-keywords", "-Xprofilespath", SRC_DIR + FS + "profile-rtjar-includes.txt", jjg@1999: "-doctitle", "Simple doctitle", "-use", "pkg3", "pkg1", "pkg2", "pkg4", jjg@1999: "pkg5", "-packagesheader", "Simple packages header","pkgDeprecated" jjg@1999: }; bpatel@2023: private static final String[] ARGS4 = new String[]{ bpatel@2023: "-d", NODEPR_NOPKGS_BUG_ID, "-sourcepath", SRC_DIR, "-nocomment", "-nodeprecated", bpatel@2023: "-keywords", "-Xprofilespath", SRC_DIR + FS + "profile-rtjar-includes-nopkgs.txt", bpatel@2023: "-doctitle", "Simple doctitle", "-use", "-packagesheader", "Simple packages header", bpatel@2023: "pkg1", "pkg2", "pkg3", "pkg4", "pkg5", "pkgDeprecated" bpatel@2023: }; bpatel@2023: private static final String[][] NODEPR_NOPKGS_TEST = { bpatel@2023: {NODEPR_NOPKGS_BUG_ID + FS + "overview-summary.html", bpatel@2023: "" bpatel@2023: }, bpatel@2023: {NODEPR_NOPKGS_BUG_ID + FS + "profile-overview-frame.html", bpatel@2023: "" bpatel@2023: } bpatel@2023: }; bpatel@2023: private static final String[][] NODEPR_NOPKGS_NEGATED_TEST = { bpatel@2023: {NODEPR_NOPKGS_BUG_ID + FS + "overview-summary.html", bpatel@2023: "compact1" bpatel@2023: } bpatel@2023: }; bpatel@2023: jjg@1999: private static final String[][] PROFILES_CONFIGURATION_TEST = { jjg@1999: //-use option test string fo profile view page jjg@1999: {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html","
  • Use
  • " jjg@1999: }, jjg@1999: //-doctitle option test string jjg@1999: {PROFILE_CONFIGURATION_BUG_ID + FS + "overview-summary.html", jjg@1999: "
    " + NL + "

    Simple doctitle

    " jjg@1999: }, jjg@1999: //-packagesheader option test string fo profiles jjg@1999: {PROFILE_CONFIGURATION_BUG_ID + FS + "profile-overview-frame.html", jjg@1999: "

    Simple packages header

    " jjg@1999: }, jjg@1999: //-keywords option test string for profiles jjg@1999: {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html", jjg@1999: "" bpatel@2023: }, bpatel@2023: //Deprecated information on a package bpatel@2023: {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html", bpatel@2023: "

    pkgDeprecated

    " + NL + "
    " + bpatel@2023: "Deprecated.
    " jjg@1999: } jjg@1999: }; jjg@1999: private static final String[][] PROFILES_CONFIGURATION_NEGATED_TEST = { jjg@1999: //-nocomments option test string jjg@1999: {PROFILE_CONFIGURATION_BUG_ID + FS + "compact1-summary.html", jjg@1999: "
    Class1Pkg2.
    " jjg@1999: } jjg@1999: }; jjg@1999: jjg@1999: /** jjg@1999: * The entry point of the test. jjg@1999: * jjg@1999: * @param args the array of command line arguments. jjg@1999: */ jjg@1999: public static void main(String[] args) { jjg@1999: TestProfilesConfiguration tester = new TestProfilesConfiguration(); jjg@1999: run(tester, ARGS3, PROFILES_CONFIGURATION_TEST, jjg@1999: PROFILES_CONFIGURATION_NEGATED_TEST); bpatel@2023: run(tester, ARGS4, NODEPR_NOPKGS_TEST, bpatel@2023: NODEPR_NOPKGS_NEGATED_TEST); jjg@1999: tester.printSummary(); jjg@1999: } jjg@1999: jjg@1999: /** jjg@1999: * {@inheritDoc} jjg@1999: */ jjg@1999: public String getBugId() { jjg@1999: return BUG_ID; jjg@1999: } jjg@1999: jjg@1999: /** jjg@1999: * {@inheritDoc} jjg@1999: */ jjg@1999: public String getBugName() { jjg@1999: return getClass().getName(); jjg@1999: } jjg@1999: }