TestInlineLinkLabel.java revision 797
2140N/A/*
2887N/A * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
2140N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2140N/A *
2140N/A * This code is free software; you can redistribute it and/or modify it
2140N/A * under the terms of the GNU General Public License version 2 only, as
2140N/A * published by the Free Software Foundation.
2140N/A *
2140N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2140N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2140N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2140N/A * version 2 for more details (a copy is included in the LICENSE file that
2140N/A * accompanied this code).
2140N/A *
2140N/A * You should have received a copy of the GNU General Public License version
2140N/A * 2 along with this work; if not, write to the Free Software Foundation,
2140N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2140N/A *
2140N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2140N/A * or visit www.oracle.com if you need additional information or have any
2140N/A * questions.
2140N/A */
2140N/A
2140N/A/*
2140N/A * @test
4618N/A * @bug 4524136
2140N/A * @summary Test to make sure label is used for inline links.
2140N/A * @author jamieh
2235N/A * @library ../lib/
2235N/A * @build JavadocTester
4618N/A * @build TestInlineLinkLabel
4618N/A * @run main TestInlineLinkLabel
2235N/A */
4618N/A
4618N/Apublic class TestInlineLinkLabel extends JavadocTester {
4618N/A
4618N/A private static final String BUG_ID = "4524136";
2235N/A private static final String[][] TEST = {
4618N/A //Search for the label to the package link.
4618N/A {BUG_ID + FS + "pkg" + FS + "C1.html" , "<a href=\"../pkg/package-summary.html\"><code>Here is a link to a package</code></a>"},
4618N/A
4618N/A //Search for the label to the class link
4618N/A {BUG_ID + FS + "pkg" + FS + "C1.html" , "<a href=\"../pkg/C2.html\" title=\"class in pkg\"><code>Here is a link to a class</code></a>"}
2235N/A };
2235N/A private static final String[][] NEGATED_TEST = NO_TEST;
4618N/A private static final String[] ARGS =
4618N/A new String[] {
4618N/A "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"};
4618N/A
4618N/A /**
4618N/A * The entry point of the test.
4618N/A * @param args the array of command line arguments.
4618N/A */
4618N/A public static void main(String[] args) {
4618N/A TestInlineLinkLabel tester = new TestInlineLinkLabel();
4618N/A run(tester, ARGS, TEST, NEGATED_TEST);
4618N/A tester.printSummary();
4618N/A }
4618N/A
4618N/A /**
4618N/A * {@inheritDoc}
4618N/A */
4618N/A public String getBugId() {
4618N/A return BUG_ID;
4618N/A }
4618N/A
4618N/A /**
2235N/A * {@inheritDoc}
4618N/A */
2235N/A public String getBugName() {
4618N/A return getClass().getName();
4618N/A }
4618N/A}
4618N/A