jdk/test/sun/nio/cs/FindCanEncodeBugs.java
changeset 3623 4e71b4e83158
parent 2921 d9d491a5a169
child 5506 202f599c92aa
equal deleted inserted replaced
3622:9676ac8a9bf1 3623:4e71b4e83158
    20  * CA 95054 USA or visit www.sun.com if you need additional information or
    20  * CA 95054 USA or visit www.sun.com if you need additional information or
    21  * have any questions.
    21  * have any questions.
    22  */
    22  */
    23 
    23 
    24 /* @test
    24 /* @test
    25    @bug 5066863 5066867 5066874 5066879 5066884 5066887 5065777
    25    @bug 5066863 5066867 5066874 5066879 5066884 5066887 5065777 6730652
    26    @summary canEncode() false iff encode() throws CharacterCodingException
    26    @summary canEncode() false iff encode() throws CharacterCodingException
    27    @run main/timeout=1200 FindCanEncodeBugs
    27    @run main/timeout=1200 FindCanEncodeBugs
    28    @author Martin Buchholz
    28    @author Martin Buchholz
    29  */
    29  */
    30 
    30 
    50         for (Map.Entry<String,Charset> e
    50         for (Map.Entry<String,Charset> e
    51                  : Charset.availableCharsets().entrySet()) {
    51                  : Charset.availableCharsets().entrySet()) {
    52             String csn = e.getKey();
    52             String csn = e.getKey();
    53             Charset cs = e.getValue();
    53             Charset cs = e.getValue();
    54 
    54 
    55             if (! cs.canEncode() ||
    55             if (! cs.canEncode() || csn.matches("x-COMPOUND_TEXT"))
    56                 csn.matches("x-COMPOUND_TEXT")   ||
       
    57                 csn.matches("x-ISO-2022-CN-CNS"))  // ISO2022_CN_CNS supports less
       
    58                 continue;
    56                 continue;
    59 
    57 
    60             //System.out.println(csn);
    58             //System.out.println(csn);
    61 
    59 
    62             CharsetEncoder enc = cs.newEncoder();
    60             CharsetEncoder enc = cs.newEncoder();