Path: blob/master/test/langtools/jdk/javadoc/doclet/testCmndLineClass/TestCmndLineClass.java
40971 views
/*1* Copyright (c) 2002, 2019, 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 450698026* @summary Test to make sure that there is no difference in the output27* when specifying packages on the command line and specifying individual28* classes.29* @library ../../lib30* @modules jdk.javadoc/jdk.javadoc.internal.tool31* @build javadoc.tester.*32* @run main TestCmndLineClass33*/3435import javadoc.tester.JavadocTester;3637public class TestCmndLineClass extends JavadocTester {3839public static void main(String... args) throws Exception {40TestCmndLineClass tester = new TestCmndLineClass();41tester.runTests();42}4344@Test45public void test() {46String outdir1 = "out-1";47String outdir2 = "out-2";4849javadoc("-d", outdir1,50"-sourcepath", testSrc,51"-notimestamp",52testSrc("C5.java"), "pkg1", "pkg2");53checkExit(Exit.OK);5455javadoc("-d", outdir2,56"-sourcepath", testSrc,57"-notimestamp",58testSrc("C5.java"),59testSrc("pkg1/C1.java"),60testSrc("pkg1/C2.java"),61testSrc("pkg2/C3.java"),62testSrc("pkg2/C4.java"));63checkExit(Exit.OK);6465diff(outdir1, outdir2,66"C5.html",67"pkg1/C1.html",68"pkg1/C2.html",69"pkg2/C3.html",70"pkg2/C4.html");71}72}737475