author | naoto |
Fri, 21 Jun 2013 13:42:55 -0700 | |
changeset 18539 | cc30fa6fcf7c |
parent 17944 | bbd67fc49daa |
child 21853 | 8aa7444a01a8 |
permissions | -rw-r--r-- |
17933 | 1 |
#!/bin/sh |
13583 | 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 | 4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 |
# |
|
6 |
# This code is free software; you can redistribute it and/or modify it |
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
|
8 |
# published by the Free Software Foundation. |
|
9 |
# |
|
10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
# accompanied this code). |
|
15 |
# |
|
16 |
# You should have received a copy of the GNU General Public License version |
|
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
# |
|
20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
21 |
# or visit www.oracle.com if you need additional information or have any |
|
22 |
# questions. |
|
23 |
# |
|
24 |
# |
|
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 |
18539
cc30fa6fcf7c
6863624: java/util/Currency/PropertiesTest.sh writable check is incorrect
naoto
parents:
17944
diff
changeset
|
27 |
# 8013086 8013233 8013903 8015960 |
13583 | 28 |
# @summary tests for "java.locale.providers" system property |
29 |
# @compile -XDignore.symbol.file LocaleProviders.java |
|
30 |
# @run shell/timeout=600 LocaleProviders.sh |
|
31 |
||
32 |
if [ "${TESTSRC}" = "" ] |
|
33 |
then |
|
34 |
echo "TESTSRC not set. Test cannot execute. Failed." |
|
35 |
exit 1 |
|
36 |
fi |
|
37 |
echo "TESTSRC=${TESTSRC}" |
|
38 |
if [ "${TESTJAVA}" = "" ] |
|
39 |
then |
|
40 |
echo "TESTJAVA not set. Test cannot execute. Failed." |
|
41 |
exit 1 |
|
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 | 47 |
echo "TESTJAVA=${TESTJAVA}" |
48 |
if [ "${TESTCLASSES}" = "" ] |
|
49 |
then |
|
50 |
echo "TESTCLASSES not set. Test cannot execute. Failed." |
|
51 |
exit 1 |
|
52 |
fi |
|
53 |
echo "TESTCLASSES=${TESTCLASSES}" |
|
54 |
echo "CLASSPATH=${CLASSPATH}" |
|
55 |
||
56 |
# set platform-dependent variables |
|
57 |
OS=`uname -s` |
|
58 |
case "$OS" in |
|
59 |
SunOS | Linux | *BSD | Darwin ) |
|
60 |
PS=":" |
|
61 |
FS="/" |
|
62 |
;; |
|
63 |
Windows* | CYGWIN* ) |
|
64 |
PS=";" |
|
65 |
FS="\\" |
|
66 |
;; |
|
67 |
* ) |
|
68 |
echo "Unrecognized system!" |
|
69 |
exit 1; |
|
70 |
;; |
|
71 |
esac |
|
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 | 138 |
runTest() |
139 |
{ |
|
14786
a9f61e0cbe61
8003890: corelibs test scripts should pass TESTVMOPTS
chegar
parents:
14336
diff
changeset
|
140 |
RUNCMD="${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -classpath ${TESTCLASSES} -Djava.locale.providers=$PREFLIST LocaleProviders $METHODNAME $PARAM1 $PARAM2 $PARAM3" |
13583 | 141 |
echo ${RUNCMD} |
142 |
${RUNCMD} |
|
143 |
result=$? |
|
144 |
if [ $result -eq 0 ] |
|
145 |
then |
|
146 |
echo "Execution successful" |
|
147 |
else |
|
148 |
echo "Execution of the test case failed." |
|
149 |
exit $result |
|
150 |
fi |
|
151 |
} |
|
152 |
||
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 | 156 |
case "$OS" in |
157 |
Windows_NT* ) |
|
158 |
WINVER=`uname -r` |
|
159 |
if [ "${WINVER}" = "5" ] |
|
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 | 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 | 164 |
fi |
165 |
;; |
|
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 | 168 |
;; |
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 | 171 |
;; |
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 | 175 |
runTest |
176 |
||
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 |
13583 | 192 |
runTest |
193 |
||
194 |
# 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
|
195 |
METHODNAME=adapterTest |
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
196 |
PREFLIST=SPI,JRE |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
197 |
PARAM1=JRE |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
198 |
PARAM2=en |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
199 |
PARAM3=US |
13583 | 200 |
runTest |
201 |
||
202 |
# 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
|
203 |
METHODNAME=adapterTest |
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
204 |
PREFLIST=CLDR,JRE |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
205 |
PARAM1=CLDR |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
206 |
PARAM2=en |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
207 |
PARAM3=GB |
13583 | 208 |
runTest |
209 |
||
210 |
# 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
|
211 |
METHODNAME=adapterTest |
13583 | 212 |
PREFLIST=JRE,CLDR |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
213 |
PARAM1=JRE |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
214 |
PARAM2=en |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
215 |
PARAM3=GB |
13583 | 216 |
runTest |
217 |
||
218 |
# 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
|
219 |
METHODNAME=adapterTest |
13583 | 220 |
PREFLIST=JRE,CLDR |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
221 |
PARAM1=CLDR |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
222 |
PARAM2=haw |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
223 |
PARAM3=GB |
13583 | 224 |
runTest |
225 |
||
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
226 |
# 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
|
227 |
METHODNAME=adapterTest |
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
228 |
PREFLIST=CLDR |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
229 |
PARAM1=CLDR |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
230 |
PARAM2=zh |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
231 |
PARAM3=CN |
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
232 |
runTest |
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
233 |
|
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
234 |
# 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
|
235 |
METHODNAME=adapterTest |
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
236 |
PREFLIST=SPI |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
237 |
PARAM1=FALLBACK |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
238 |
PARAM2=en |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
239 |
PARAM3=US |
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
240 |
runTest |
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
241 |
PREFLIST=FOO |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
242 |
PARAM1=JRE |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
243 |
PARAM2=en |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
244 |
PARAM3=US |
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
245 |
runTest |
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
246 |
PREFLIST=BAR,SPI |
14028
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
247 |
PARAM1=FALLBACK |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
248 |
PARAM2=en |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
249 |
PARAM3=US |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
250 |
runTest |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
251 |
|
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
252 |
# 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
|
253 |
METHODNAME=bug7198834Test |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
254 |
PREFLIST=HOST |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
255 |
PARAM1= |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
256 |
PARAM2= |
5f3d5ae5f1ea
7198834: HOST Adapter: one extra empty space in the end of the pattern string
naoto
parents:
14024
diff
changeset
|
257 |
PARAM3= |
14024
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
258 |
runTest |
694c379c2958
7196799: CLDR adapter can not be invoked when region code is specified in Locale
naoto
parents:
13583
diff
changeset
|
259 |
|
14185
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
260 |
# testing 8000245 fix. |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
261 |
METHODNAME=tzNameTest |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
262 |
PREFLIST="JRE -Djava.ext.dirs=${SPIDIR}" |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
263 |
PARAM1=Europe/Moscow |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
264 |
PARAM2= |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
265 |
PARAM3= |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
266 |
runTest |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
267 |
|
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
268 |
# testing 8000615 fix. |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
269 |
METHODNAME=tzNameTest |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
270 |
PREFLIST="JRE -Djava.ext.dirs=${SPIDIR}" |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
271 |
PARAM1=America/Los_Angeles |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
272 |
PARAM2= |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
273 |
PARAM3= |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
274 |
runTest |
916ec0a4d039
8000245: SimpleDateFormat.format(date, StringBuffer, FieldPosition) doesn't work as expected with custom extensions
naoto
parents:
14028
diff
changeset
|
275 |
|
14336
4a3418a2c07f
8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents:
14185
diff
changeset
|
276 |
# testing 8001440 fix. |
4a3418a2c07f
8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents:
14185
diff
changeset
|
277 |
METHODNAME=bug8001440Test |
4a3418a2c07f
8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents:
14185
diff
changeset
|
278 |
PREFLIST=CLDR |
4a3418a2c07f
8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents:
14185
diff
changeset
|
279 |
PARAM1= |
4a3418a2c07f
8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents:
14185
diff
changeset
|
280 |
PARAM2= |
4a3418a2c07f
8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents:
14185
diff
changeset
|
281 |
PARAM3= |
4a3418a2c07f
8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents:
14185
diff
changeset
|
282 |
runTest |
4a3418a2c07f
8001440: CLDR adapter: Invalid number extension in language tag causes exception in NumberFormat.format()
naoto
parents:
14185
diff
changeset
|
283 |
|
17169
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
284 |
# testing 8010666 fix. |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
285 |
if [ "${DEFLANG}" = "en" ] |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
286 |
then |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
287 |
METHODNAME=bug8010666Test |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
288 |
PREFLIST=HOST |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
289 |
PARAM1= |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
290 |
PARAM2= |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
291 |
PARAM3= |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
292 |
runTest |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
293 |
fi |
5e5039c3181d
8010666: Implement Currency/LocaleNameProvider in Windows Host LocaleProviderAdapter
naoto
parents:
15254
diff
changeset
|
294 |
|
17440
fb37aa6b305e
8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents:
17169
diff
changeset
|
295 |
# testing 8013086 fix. |
fb37aa6b305e
8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents:
17169
diff
changeset
|
296 |
METHODNAME=bug8013086Test |
fb37aa6b305e
8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents:
17169
diff
changeset
|
297 |
PREFLIST="JRE,SPI -Djava.ext.dirs=${SPIDIR}" |
fb37aa6b305e
8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents:
17169
diff
changeset
|
298 |
PARAM1=ja |
fb37aa6b305e
8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents:
17169
diff
changeset
|
299 |
PARAM2=JP |
fb37aa6b305e
8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents:
17169
diff
changeset
|
300 |
PARAM3= |
fb37aa6b305e
8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents:
17169
diff
changeset
|
301 |
runTest |
fb37aa6b305e
8013086: NPE thrown by SimpleDateFormat with TimeZoneNameProvider supplied
naoto
parents:
17169
diff
changeset
|
302 |
|
17944
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
303 |
# 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
|
304 |
METHODNAME=bug8013903Test |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
305 |
PREFLIST=HOST,JRE |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
306 |
PARAM1= |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
307 |
PARAM2= |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
308 |
PARAM3= |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
309 |
runTest |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
310 |
METHODNAME=bug8013903Test |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
311 |
PREFLIST=HOST |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
312 |
PARAM1= |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
313 |
PARAM2= |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
314 |
PARAM3= |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
315 |
runTest |
bbd67fc49daa
8013903: Japanese calendar field names are not displayed with -Djava.locale.providers=HOST on Windows
naoto
parents:
17933
diff
changeset
|
316 |
|
13583 | 317 |
exit $result |