TestRecurseSubPackages.java revision 3233:b5d08bc0d224
137535Sdes/*
237535Sdes * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
337535Sdes * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
437535Sdes *
537535Sdes * This code is free software; you can redistribute it and/or modify it
637535Sdes * under the terms of the GNU General Public License version 2 only, as
737535Sdes * published by the Free Software Foundation.
837535Sdes *
937535Sdes * This code is distributed in the hope that it will be useful, but WITHOUT
1037535Sdes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1137535Sdes * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1237535Sdes * version 2 for more details (a copy is included in the LICENSE file that
1337535Sdes * accompanied this code).
1437535Sdes *
1537535Sdes * You should have received a copy of the GNU General Public License version
1637535Sdes * 2 along with this work; if not, write to the Free Software Foundation,
1737535Sdes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1837535Sdes *
1937535Sdes * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2037535Sdes * or visit www.oracle.com if you need additional information or have any
2137535Sdes * questions.
2237535Sdes */
2337535Sdes
2437535Sdes/*
2537535Sdes * @test
2637535Sdes * @bug 4074234
2737535Sdes * @summary Make Javadoc capable of traversing/recursing all of given subpackages.
2850476Speter * @author jamieh
2937535Sdes * @library ../lib
3037535Sdes * @modules jdk.javadoc
3137535Sdes * @build JavadocTester
3237571Sdes * @run main TestRecurseSubPackages
3337535Sdes */
3437535Sdes
3537535Sdespublic class TestRecurseSubPackages extends JavadocTester {
3637535Sdes
3737535Sdes    public static void main(String... args) throws Exception {
3837535Sdes        TestRecurseSubPackages tester = new TestRecurseSubPackages();
3937535Sdes        tester.runTests();
4037535Sdes    }
4137535Sdes
4237535Sdes    @Test
4337535Sdes    void test() {
4437535Sdes        javadoc("-d", "out",
4537535Sdes                "-sourcepath", testSrc,
4637535Sdes                "-subpackages", "pkg1",
4737535Sdes                "-exclude", "pkg1.pkg2.packageToExclude");
4837535Sdes        checkExit(Exit.OK);
4937535Sdes
5037535Sdes        for (int i = 1; i <= 6; i++) {
5137535Sdes            checkOutput("allclasses-frame.html", true,
5237535Sdes                    "C" + i + ".html");
5337535Sdes        }
5437535Sdes
5537535Sdes        checkOutput("allclasses-frame.html", false,
5637535Sdes                "DummyClass.html");
5737535Sdes    }
5841862Sdes
5937535Sdes}
6037535Sdes