test/com/sun/javadoc/testDocEncoding/TestDocEncoding.java

Wed, 18 Sep 2013 22:47:06 -0700

author
bpatel
date
Wed, 18 Sep 2013 22:47:06 -0700
changeset 2036
8df12c315ea3
parent 0
959103a6100f
permissions
-rw-r--r--

8024096: some javadoc tests may contain false positive results
Reviewed-by: jjg

     1 /*
     2  * Copyright (c) 2002, 2012, 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  * Portions Copyright (c) 2012 IBM Corporation
    26  */
    28 /*
    29  * @test
    30  * @bug      8000743
    31  * @summary  Run tests on -docencoding to see if the value is
    32              used for stylesheet as well.
    33  * @author   jayashree viswanathan
    34  * @library  ../lib/
    35  * @build    JavadocTester TestDocEncoding
    36  * @run main TestDocEncoding
    37  */
    39 public class TestDocEncoding extends JavadocTester {
    41     //Test information.
    42     private static final String BUG_ID = "8000743";
    44     //Javadoc arguments.
    45     private static final String[] ARGS = new String[] {
    46         "-d", BUG_ID, "-docencoding", "Cp930",
    47         "-sourcepath", SRC_DIR, "pkg"
    48     };
    50     private static final String[][] TEST = NO_TEST;
    52     private static final String[][] NEGATED_TEST = {
    53         {BUG_ID + FS + "stylesheet.css",
    54             "body {" + NL + "    background-color:#ffffff;"}
    55     };
    57     /**
    58      * The entry point of the test.
    59      * @param args the array of command line arguments.
    60      */
    61     public static void main(String[] args) {
    62         TestDocEncoding tester = new TestDocEncoding();
    63         run(tester, ARGS, TEST, NEGATED_TEST);
    64         tester.printSummary();
    65     }
    67     /**
    68      * {@inheritDoc}
    69      */
    70     public String getBugId() {
    71         return BUG_ID;
    72     }
    74     /**
    75      * {@inheritDoc}
    76      */
    77     public String getBugName() {
    78         return getClass().getName();
    79     }
    80 }

mercurial