AuthorDD.java revision 3294:9adfb22ff08f
125537Sdfr/*
225537Sdfr * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
325537Sdfr * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
425537Sdfr *
525537Sdfr * This code is free software; you can redistribute it and/or modify it
625537Sdfr * under the terms of the GNU General Public License version 2 only, as
725537Sdfr * published by the Free Software Foundation.
825537Sdfr *
925537Sdfr * This code is distributed in the hope that it will be useful, but WITHOUT
1025537Sdfr * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1125537Sdfr * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
1225537Sdfr * version 2 for more details (a copy is included in the LICENSE file that
1325537Sdfr * accompanied this code).
1425537Sdfr *
1525537Sdfr * You should have received a copy of the GNU General Public License version
1625537Sdfr * 2 along with this work; if not, write to the Free Software Foundation,
1725537Sdfr * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1825537Sdfr *
1925537Sdfr * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2025537Sdfr * or visit www.oracle.com if you need additional information or have any
2125537Sdfr * questions.
2225537Sdfr */
2325537Sdfr
2425537Sdfr/*
2525537Sdfr * @test
2643301Sdillon * @bug 4651598 8026567
2725537Sdfr * @summary Javadoc wrongly inserts </DD> tags when using multiple @author tags
2825537Sdfr * @author dkramer
2925537Sdfr * @library ../lib
3025537Sdfr * @modules jdk.javadoc/jdk.javadoc.internal.tool
3125537Sdfr * @build JavadocTester
3241153Swollman * @run main AuthorDD
3325537Sdfr */
3425537Sdfr
3525537Sdfr/**
3625537Sdfr * Runs javadoc and runs regression tests on the resulting HTML.
3725537Sdfr */
3841153Swollmanpublic class AuthorDD extends JavadocTester {
3925537Sdfr
4043301Sdillon    public static void main(String... args) throws Exception {
4141153Swollman        AuthorDD tester = new AuthorDD();
4225537Sdfr        tester.runTests();
4325537Sdfr    }
4425537Sdfr
4525537Sdfr    @Test
4625537Sdfr    void test() {
4741153Swollman        // Test for all cases except the split index page
4841153Swollman        javadoc("-d", "out",
4941153Swollman                "-author",
5041153Swollman                "-version",
5125537Sdfr                "-sourcepath", testSrc,
5225537Sdfr                "p1");
5342435Sdfr        checkExit(Exit.OK);
5442435Sdfr
5542435Sdfr        checkOutput("p1/C1.html", true,
5642435Sdfr                // Test single @since tag:
5742435Sdfr                "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
5842435Sdfr                + "<dd>JDK 1.0</dd>",
5942435Sdfr                // Test multiple @author tags:
6042435Sdfr                "<dt><span class=\"simpleTagLabel\">Author:</span></dt>\n"
6142435Sdfr                + "<dd>Doug Kramer, Jamie, Neal</dd>");
6242435Sdfr    }
6342435Sdfr}
6440137Speter