Path: blob/aarch64-shenandoah-jdk8u272-b10/langtools/test/com/sun/javadoc/testAbsLinkPath/TestAbsLinkPath.java
48425 views
/*1* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/*24* @test25* @bug 464074526* @summary This test verifys that the -link option handles absolute paths.27* @author jamieh28* @library ../lib/29* @build JavadocTester30* @build TestAbsLinkPath31* @run main TestAbsLinkPath32*/3334public class TestAbsLinkPath extends JavadocTester {3536private static final String BUG_ID = "4640745";37private static final String[][] TEST = {38{"tmp" + FS + "pkg1" + FS + "C1.html", "C2.html"}};39private static final String[][] NEGATED_TEST = NO_TEST;4041private static final String[] ARGS1 =42new String[] {43"-d", "tmp2", "-sourcepath", SRC_DIR, "pkg2"};44private static final String[] ARGS2 =45new String[] {46"-d", "tmp", "-sourcepath", SRC_DIR,47"-link", ".." + FS + "tmp2", "pkg1"};4849/**50* The entry point of the test.51* @param args the array of command line arguments.52*/53public static void main(String[] args) {54TestAbsLinkPath tester = new TestAbsLinkPath();55run(tester, ARGS1, NO_TEST, NO_TEST);56run(tester, ARGS2, TEST, NEGATED_TEST);57tester.printSummary();58}5960/**61* {@inheritDoc}62*/63public String getBugId() {64return BUG_ID;65}6667/**68* {@inheritDoc}69*/70public String getBugName() {71return getClass().getName();72}73}747576