Fri, 04 Oct 2013 13:32:30 -0700
8008164: Invisible table captions in javadoc-generated html
Reviewed-by: jjg
1 /*
2 * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
24 /*
25 * @test
26 * @bug 4657239 4775743
27 * @summary Make sure a notification is printed when an output directory must
28 * be created.
29 * Make sure classname is not include in javadoc usage message.
30 * @author jamieh
31 * @library ../lib/
32 * @build JavadocTester
33 * @build TestNotifications
34 * @run main TestNotifications
35 */
37 public class TestNotifications extends JavadocTester {
39 //Test information.
40 private static final String BUG_ID = "4657239";
42 //Javadoc arguments.
43 private static final String[] ARGS = new String[] {
44 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
45 };
47 private static final String[] ARGS2 = new String[] {
48 "-help"
49 };
51 //Input for string search tests.
52 private static final String[][] TEST = {
53 {NOTICE_OUTPUT, "Creating destination directory: \"4657239"}
54 };
55 private static final String[][] NEGATED_TEST = {
56 {NOTICE_OUTPUT, "Creating destination directory: \"4657239"}
57 };
59 private static final String[][] NEGATED_TEST2 = {
60 {NOTICE_OUTPUT, "[classnames]"}
61 };
63 /**
64 * The entry point of the test.
65 * @param args the array of command line arguments.
66 */
67 public static void main(String[] args) {
68 TestNotifications tester = new TestNotifications();
69 // Notify that the destination directory must be created.
70 run(tester, ARGS, TEST, NO_TEST);
71 // No need to notify that the destination must be created because
72 // it already exists.
73 run(tester, ARGS, NO_TEST, NEGATED_TEST);
74 //Make sure classname is not include in javadoc usage message.
75 run(tester, ARGS2, NO_TEST, NEGATED_TEST2);
76 tester.printSummary();
77 }
79 /**
80 * {@inheritDoc}
81 */
82 public String getBugId() {
83 return BUG_ID;
84 }
86 /**
87 * {@inheritDoc}
88 */
89 public String getBugName() {
90 return getClass().getName();
91 }
92 }