jdk/test/java/util/Locale/LocaleProviders.sh
author naoto
Tue, 16 Dec 2014 12:48:31 -0800
changeset 28093 270b6925cbc8
parent 22989 2d6804cfdc0e
child 31263 a81a0af34ca0
permissions -rw-r--r--
8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
17933
b18cda672b79 8014834: shell tests don't begin with #!/bin/sh
emc
parents: 17476
diff changeset
     1
#!/bin/sh
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
     2
#
17169
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
     3
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
     5
#
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
     8
# published by the Free Software Foundation.
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
     9
#
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    10
# This code is distributed in the hope that it will be useful, but WITHOUT
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    11
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    12
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    13
# version 2 for more details (a copy is included in the LICENSE file that
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    14
# accompanied this code).
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    15
#
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    16
# You should have received a copy of the GNU General Public License version
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    17
# 2 along with this work; if not, write to the Free Software Foundation,
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    18
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    19
#
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    20
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    21
# or visit www.oracle.com if you need additional information or have any
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    22
# questions.
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    23
#
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    24
#
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    25
# @test
17169
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
    26
# @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
21853
8aa7444a01a8 8028771: regression test java/util/Locale/LocaleProviders.sh failed
naoto
parents: 18539
diff changeset
    27
#      8013086 8013233 8013903 8015960 8028771
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    28
# @summary tests for "java.locale.providers" system property
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    29
# @compile -XDignore.symbol.file LocaleProviders.java
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    30
# @run shell/timeout=600 LocaleProviders.sh
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    31
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    32
if [ "${TESTSRC}" = "" ]
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    33
then
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    34
  echo "TESTSRC not set.  Test cannot execute.  Failed."
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    35
  exit 1
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    36
fi
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    37
echo "TESTSRC=${TESTSRC}"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    38
if [ "${TESTJAVA}" = "" ]
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    39
then
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    40
  echo "TESTJAVA not set.  Test cannot execute.  Failed."
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    41
  exit 1
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    42
fi
15254
3997a6f357cb 8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents: 14786
diff changeset
    43
if [ "${COMPILEJAVA}" = "" ]
3997a6f357cb 8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents: 14786
diff changeset
    44
then
3997a6f357cb 8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents: 14786
diff changeset
    45
  COMPILEJAVA="${TESTJAVA}"
3997a6f357cb 8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents: 14786
diff changeset
    46
fi
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    47
echo "TESTJAVA=${TESTJAVA}"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    48
if [ "${TESTCLASSES}" = "" ]
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    49
then
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    50
  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    51
  exit 1
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    52
fi
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    53
echo "TESTCLASSES=${TESTCLASSES}"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    54
echo "CLASSPATH=${CLASSPATH}"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    55
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    56
# set platform-dependent variables
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    57
OS=`uname -s`
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    58
case "$OS" in
22602
0d9a07b0d7e9 8028537: PPC64: Updated the JDK regression tests to run on AIX
simonis
parents: 21853
diff changeset
    59
  SunOS | Linux | *BSD | Darwin | AIX )
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    60
    PS=":"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    61
    FS="/"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    62
    ;;
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    63
  Windows* | CYGWIN* )
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    64
    PS=";"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    65
    FS="\\"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    66
    ;;
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    67
  * )
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    68
    echo "Unrecognized system!"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    69
    exit 1;
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    70
    ;;
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    71
esac
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
    72
17440
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    73
# create SPI implementations
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    74
mk() {
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    75
  d=`dirname $1`
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    76
  if [ ! -d $d ]; then mkdir -p $d; fi
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    77
  cat - >$1
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    78
}
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    79
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    80
SPIDIR=${TESTCLASSES}${FS}spi
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    81
rm -rf ${SPIDIR}
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    82
mk ${SPIDIR}${FS}src${FS}tznp.java << EOF
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    83
import java.util.spi.TimeZoneNameProvider;
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    84
import java.util.Locale;
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    85
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    86
public class tznp extends TimeZoneNameProvider {
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    87
    public String getDisplayName(String ID, boolean daylight, int style, Locale locale) {
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    88
        return "tznp";
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    89
    }
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    90
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
    91
    public Locale[] getAvailableLocales() {
17440
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    92
        Locale[] locales = {Locale.US};
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    93
        return locales;
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    94
    }
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    95
}
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    96
EOF
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    97
mk ${SPIDIR}${FS}src${FS}tznp8013086.java << EOF
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    98
import java.util.spi.TimeZoneNameProvider;
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
    99
import java.util.Locale;
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   100
import java.util.TimeZone;
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   101
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   102
public class tznp8013086 extends TimeZoneNameProvider {
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   103
    public String getDisplayName(String ID, boolean daylight, int style, Locale locale) {
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   104
        if (!daylight && style==TimeZone.LONG) {
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   105
            return "tznp8013086";
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   106
        } else {
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   107
            return null;
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   108
        }
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   109
    }
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   110
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   111
    public Locale[] getAvailableLocales() {
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   112
        Locale[] locales = {Locale.JAPAN};
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   113
        return locales;
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   114
    }
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   115
}
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   116
EOF
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   117
mk ${SPIDIR}${FS}dest${FS}META-INF${FS}services${FS}java.util.spi.TimeZoneNameProvider << EOF
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   118
tznp
17440
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   119
tznp8013086
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   120
EOF
15254
3997a6f357cb 8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents: 14786
diff changeset
   121
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${SPIDIR}${FS}dest \
17440
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   122
    ${SPIDIR}${FS}src${FS}tznp.java \
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   123
    ${SPIDIR}${FS}src${FS}tznp8013086.java
15254
3997a6f357cb 8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents: 14786
diff changeset
   124
${COMPILEJAVA}${FS}bin${FS}jar ${TESTTOOLVMOPTS} cvf ${SPIDIR}${FS}tznp.jar -C ${SPIDIR}${FS}dest .
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   125
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   126
# get the platform default locales
14786
a9f61e0cbe61 8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents: 14336
diff changeset
   127
PLATDEF=`${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath ${TESTCLASSES} LocaleProviders getPlatformLocale display`
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   128
DEFLANG=`echo ${PLATDEF} | sed -e "s/,.*//"`
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   129
DEFCTRY=`echo ${PLATDEF} | sed -e "s/.*,//"`
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   130
echo "DEFLANG=${DEFLANG}"
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   131
echo "DEFCTRY=${DEFCTRY}"
14786
a9f61e0cbe61 8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents: 14336
diff changeset
   132
PLATDEF=`${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath ${TESTCLASSES} LocaleProviders getPlatformLocale format`
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   133
DEFFMTLANG=`echo ${PLATDEF} | sed -e "s/,.*//"`
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   134
DEFFMTCTRY=`echo ${PLATDEF} | sed -e "s/.*,//"`
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   135
echo "DEFFMTLANG=${DEFFMTLANG}"
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   136
echo "DEFFMTCTRY=${DEFFMTCTRY}"
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   137
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   138
runTest()
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   139
{
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   140
    RUNCMD="${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath ${TESTCLASSES}${PS}${SPICLASSES} -Djava.locale.providers=$PREFLIST LocaleProviders $METHODNAME $PARAM1 $PARAM2 $PARAM3"
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   141
    echo ${RUNCMD}
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   142
    ${RUNCMD}
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   143
    result=$?
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   144
    if [ $result -eq 0 ]
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   145
    then
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   146
      echo "Execution successful"
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   147
    else
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   148
      echo "Execution of the test case failed."
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   149
      exit $result
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   150
    fi
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   151
}
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   152
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   153
# testing HOST is selected for the default locale, if specified on Windows or MacOSX
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   154
METHODNAME=adapterTest
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   155
PREFLIST=HOST,JRE
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   156
case "$OS" in
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   157
  Windows_NT* )
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   158
    WINVER=`uname -r`
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   159
    if [ "${WINVER}" = "5" ]
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   160
    then
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   161
      PARAM1=JRE
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   162
    else
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   163
      PARAM1=HOST
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   164
    fi
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   165
    ;;
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   166
  CYGWIN_NT-6* | Darwin )
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   167
    PARAM1=HOST
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   168
    ;;
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   169
  * )
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   170
    PARAM1=JRE
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   171
    ;;
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   172
esac
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   173
PARAM2=${DEFLANG}
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   174
PARAM3=${DEFCTRY}
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   175
runTest
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   176
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   177
# testing HOST is NOT selected for the non-default locale, if specified
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   178
METHODNAME=adapterTest
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   179
PREFLIST=HOST,JRE
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   180
PARAM1=JRE
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   181
# Try to find the locale JRE supports which is not the platform default (HOST supports that one)
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   182
if [ "${DEFLANG}" != "en" ] && [ "${DEFFMTLANG}" != "en" ]; then
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   183
  PARAM2=en
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   184
  PARAM3=US
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   185
elif [ "${DEFLANG}" != "ja" ] && [ "${DEFFMTLANG}" != "ja" ]; then 
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   186
  PARAM2=ja
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   187
  PARAM3=JP
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   188
else
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   189
  PARAM2=zh
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   190
  PARAM3=CN
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   191
fi
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   192
SPICLASSES=
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   193
runTest
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   194
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   195
# testing SPI is NOT selected, as there is none.
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   196
METHODNAME=adapterTest
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   197
PREFLIST=SPI,JRE
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   198
PARAM1=JRE
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   199
PARAM2=en
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   200
PARAM3=US
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   201
SPICLASSES=
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   202
runTest
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   203
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   204
# testing the order, variaton #1. This assumes en_GB DateFormat data are available both in JRE & CLDR
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   205
METHODNAME=adapterTest
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   206
PREFLIST=CLDR,JRE
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   207
PARAM1=CLDR
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   208
PARAM2=en
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   209
PARAM3=GB
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   210
SPICLASSES=
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   211
runTest
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   212
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   213
# testing the order, variaton #2. This assumes en_GB DateFormat data are available both in JRE & CLDR
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   214
METHODNAME=adapterTest
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   215
PREFLIST=JRE,CLDR
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   216
PARAM1=JRE
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   217
PARAM2=en
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   218
PARAM3=GB
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   219
SPICLASSES=
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   220
runTest
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   221
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   222
# testing the order, variaton #3 for non-existent locale in JRE assuming "haw" is not in JRE.
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   223
METHODNAME=adapterTest
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   224
PREFLIST=JRE,CLDR
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   225
PARAM1=CLDR
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   226
PARAM2=haw
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   227
PARAM3=GB
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   228
SPICLASSES=
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   229
runTest
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   230
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   231
# testing the order, variaton #4 for the bug 7196799. CLDR's "zh" data should be used in "zh_CN"
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   232
METHODNAME=adapterTest
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   233
PREFLIST=CLDR
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   234
PARAM1=CLDR
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   235
PARAM2=zh
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   236
PARAM3=CN
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   237
SPICLASSES=
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   238
runTest
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   239
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   240
# testing FALLBACK provider. SPI and invalid one cases.
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   241
METHODNAME=adapterTest
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   242
PREFLIST=SPI
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   243
PARAM1=FALLBACK
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   244
PARAM2=en
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   245
PARAM3=US
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   246
SPICLASSES=
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   247
runTest
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   248
PREFLIST=FOO
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   249
PARAM1=JRE
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   250
PARAM2=en
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   251
PARAM3=US
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   252
SPICLASSES=
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   253
runTest
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   254
PREFLIST=BAR,SPI
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   255
PARAM1=FALLBACK
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   256
PARAM2=en
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   257
PARAM3=US
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   258
SPICLASSES=
14028
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   259
runTest
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   260
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   261
# testing 7198834 fix. Only works on Windows Vista or upper.
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   262
METHODNAME=bug7198834Test
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   263
PREFLIST=HOST
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   264
PARAM1=
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   265
PARAM2=
5f3d5ae5f1ea 7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents: 14024
diff changeset
   266
PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   267
SPICLASSES=
14024
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   268
runTest
694c379c2958 7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents: 13583
diff changeset
   269
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   270
# testing 8000245 fix.
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   271
METHODNAME=tzNameTest
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   272
PREFLIST=JRE
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   273
PARAM1=Europe/Moscow
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   274
PARAM2=
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   275
PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   276
SPICLASSES=${SPIDIR}
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   277
runTest
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   278
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   279
# testing 8000615 fix.
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   280
METHODNAME=tzNameTest
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   281
PREFLIST=JRE
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   282
PARAM1=America/Los_Angeles
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   283
PARAM2=
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   284
PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   285
SPICLASSES=${SPIDIR}
14185
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   286
runTest
916ec0a4d039 8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents: 14028
diff changeset
   287
14336
4a3418a2c07f 8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents: 14185
diff changeset
   288
# testing 8001440 fix.
4a3418a2c07f 8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents: 14185
diff changeset
   289
METHODNAME=bug8001440Test
4a3418a2c07f 8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents: 14185
diff changeset
   290
PREFLIST=CLDR
4a3418a2c07f 8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents: 14185
diff changeset
   291
PARAM1=
4a3418a2c07f 8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents: 14185
diff changeset
   292
PARAM2=
4a3418a2c07f 8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents: 14185
diff changeset
   293
PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   294
SPICLASSES=
14336
4a3418a2c07f 8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents: 14185
diff changeset
   295
runTest
4a3418a2c07f 8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents: 14185
diff changeset
   296
17169
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   297
# testing 8010666 fix.
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   298
if [ "${DEFLANG}" = "en" ]
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   299
then
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   300
  METHODNAME=bug8010666Test
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   301
  PREFLIST=HOST
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   302
  PARAM1=
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   303
  PARAM2=
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   304
  PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   305
  SPICLASSES=
17169
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   306
  runTest
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   307
fi
5e5039c3181d 8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents: 15254
diff changeset
   308
17440
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   309
# testing 8013086 fix.
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   310
METHODNAME=bug8013086Test
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   311
PREFLIST=JRE,SPI
17440
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   312
PARAM1=ja
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   313
PARAM2=JP
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   314
PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   315
SPICLASSES=${SPIDIR}
17440
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   316
runTest
fb37aa6b305e 8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents: 17169
diff changeset
   317
17944
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   318
# testing 8013903 fix. (Windows only)
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   319
METHODNAME=bug8013903Test
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   320
PREFLIST=HOST,JRE
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   321
PARAM1=
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   322
PARAM2=
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   323
PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   324
SPICLASSES=
17944
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   325
runTest
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   326
METHODNAME=bug8013903Test
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   327
PREFLIST=HOST
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   328
PARAM1=
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   329
PARAM2=
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   330
PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   331
SPICLASSES=
17944
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   332
runTest
bbd67fc49daa 8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents: 17933
diff changeset
   333
22989
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   334
# testing 8027289 fix, if the platform format default is zh_CN
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   335
# this assumes Windows' currency symbol for zh_CN is \u00A5, the yen
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   336
# (yuan) sign.
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   337
if [ "${DEFFMTLANG}" = "zh" ] && [ "${DEFFMTCTRY}" = "CN" ]; then
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   338
  METHODNAME=bug8027289Test
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   339
  PREFLIST=JRE,HOST
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   340
  PARAM1=FFE5
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   341
  PARAM2=
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   342
  PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   343
  SPICLASSES=
22989
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   344
  runTest
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   345
  METHODNAME=bug8027289Test
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   346
  PREFLIST=HOST
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   347
  PARAM1=00A5
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   348
  PARAM2=
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   349
  PARAM3=
28093
270b6925cbc8 8062588: Support java.util.spi.*, java.text.spi.*, java.awt.im.spi loaded from classpath
naoto
parents: 22989
diff changeset
   350
  SPICLASSES=
22989
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   351
  runTest
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   352
fi
2d6804cfdc0e 8027289: [Windows zh_CN] NumberFormat: Incorrect sequence of loading currency symbol
naoto
parents: 22602
diff changeset
   353
13583
dc0017b1a452 6336885: RFE: Locale Data Deployment Enhancements
naoto
parents:
diff changeset
   354
exit $result