langtools/test/com/sun/javadoc/testEncoding/TestEncoding.java
changeset 20238 a08610368936
parent 5520 86e4b9a9da40
child 23971 f5ff1f5a8dee
equal deleted inserted replaced
20237:b6d89903c867 20238:a08610368936
     1 /*
     1 /*
     2  * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     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
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 4661481
    26  * @bug 4661481 8024096
    27  * @summary This test determines if the value of the -encoding option is
    27  * @summary This test determines if the value of the -encoding option is
    28  * properly passed from Javadoc to the source file parser.
    28  * properly passed from Javadoc to the source file parser.
    29  * @author jamieh
    29  * @author jamieh
    30  * @library ../lib/
    30  * @library ../lib/
    31  * @build JavadocTester
    31  * @build JavadocTester
    38     private static final String BUG_ID = "4661481";
    38     private static final String BUG_ID = "4661481";
    39     private static final String[][] TEST = NO_TEST;
    39     private static final String[][] TEST = NO_TEST;
    40 
    40 
    41     //If ??? is found in the output, the source file was not read with the correct encoding setting.
    41     //If ??? is found in the output, the source file was not read with the correct encoding setting.
    42     private static final String[][] NEGATED_TEST = {
    42     private static final String[][] NEGATED_TEST = {
    43         {BUG_ID + FS + "EncodeTest.html", "???"}
    43         {BUG_ID + FS + "EncodeTest.html", "??"}
    44     };
    44     };
    45     private static final String[] ARGS =
    45     private static final String[] ARGS =
    46         new String[] {
    46         new String[] {
    47             "-d", BUG_ID, "-sourcepath", SRC_DIR,
    47             "-d", BUG_ID, "-sourcepath", SRC_DIR,
    48             "-encoding", "SJIS", SRC_DIR + FS + "EncodeTest.java"
    48             "-encoding", "iso-8859-1", SRC_DIR + FS + "EncodeTest.java"
    49         };
    49         };
    50 
    50 
    51     /**
    51     /**
    52      * The entry point of the test.
    52      * The entry point of the test.
    53      * @param args the array of command line arguments.
    53      * @param args the array of command line arguments.