test/java/util/Locale/LocaleProviders.sh

Print this page




   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
  26 # @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
  27 #      8013086 8013233 8013903 8015960 8028771
  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
  43 if [ "${COMPILEJAVA}" = "" ]
  44 then
  45   COMPILEJAVA="${TESTJAVA}"
  46 fi
  47 echo "TESTJAVA=${TESTJAVA}"


 207 PARAM1=CLDR
 208 PARAM2=en
 209 PARAM3=GB
 210 SPICLASSES=
 211 runTest
 212 
 213 # testing the order, variaton #2. This assumes en_GB DateFormat data are available both in JRE & CLDR
 214 METHODNAME=adapterTest
 215 PREFLIST=JRE,CLDR
 216 PARAM1=JRE
 217 PARAM2=en
 218 PARAM3=GB
 219 SPICLASSES=
 220 runTest
 221 
 222 # testing the order, variaton #3 for non-existent locale in JRE assuming "haw" is not in JRE.
 223 METHODNAME=adapterTest
 224 PREFLIST=JRE,CLDR
 225 PARAM1=CLDR
 226 PARAM2=haw
 227 PARAM3=GB
 228 SPICLASSES=
 229 runTest
 230 
 231 # testing the order, variaton #4 for the bug 7196799. CLDR's "zh" data should be used in "zh_CN"
 232 METHODNAME=adapterTest
 233 PREFLIST=CLDR
 234 PARAM1=CLDR
 235 PARAM2=zh
 236 PARAM3=CN
 237 SPICLASSES=
 238 runTest
 239 
 240 # testing FALLBACK provider. SPI and invalid one cases.
 241 METHODNAME=adapterTest
 242 PREFLIST=SPI
 243 PARAM1=FALLBACK
 244 PARAM2=en
 245 PARAM3=US
 246 SPICLASSES=
 247 runTest
 248 PREFLIST=FOO
 249 PARAM1=JRE
 250 PARAM2=en
 251 PARAM3=US
 252 SPICLASSES=
 253 runTest
 254 PREFLIST=BAR,SPI
 255 PARAM1=FALLBACK
 256 PARAM2=en
 257 PARAM3=US
 258 SPICLASSES=
 259 runTest
 260 
 261 # testing 7198834 fix. Only works on Windows Vista or upper.
 262 METHODNAME=bug7198834Test
 263 PREFLIST=HOST
 264 PARAM1=
 265 PARAM2=
 266 PARAM3=
 267 SPICLASSES=
 268 runTest
 269 




   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
  26 # @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8008577
  27 #      8010666 8013086 8013233 8013903 8015960 8028771
  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
  43 if [ "${COMPILEJAVA}" = "" ]
  44 then
  45   COMPILEJAVA="${TESTJAVA}"
  46 fi
  47 echo "TESTJAVA=${TESTJAVA}"


 207 PARAM1=CLDR
 208 PARAM2=en
 209 PARAM3=GB
 210 SPICLASSES=
 211 runTest
 212 
 213 # testing the order, variaton #2. This assumes en_GB DateFormat data are available both in JRE & CLDR
 214 METHODNAME=adapterTest
 215 PREFLIST=JRE,CLDR
 216 PARAM1=JRE
 217 PARAM2=en
 218 PARAM3=GB
 219 SPICLASSES=
 220 runTest
 221 
 222 # testing the order, variaton #3 for non-existent locale in JRE assuming "haw" is not in JRE.
 223 METHODNAME=adapterTest
 224 PREFLIST=JRE,CLDR
 225 PARAM1=CLDR
 226 PARAM2=haw
 227 PARAM3=
 228 SPICLASSES=
 229 runTest
 230 
 231 # testing the order, variaton #4 for the bug 7196799. CLDR's "zh" data should be used in "zh_CN"
 232 METHODNAME=adapterTest
 233 PREFLIST=CLDR
 234 PARAM1=CLDR
 235 PARAM2=zh
 236 PARAM3=CN
 237 SPICLASSES=
 238 runTest
 239 
 240 # testing FALLBACK provider. SPI and invalid one cases.
 241 METHODNAME=adapterTest
 242 PREFLIST=SPI
 243 PARAM1=FALLBACK
 244 PARAM2=en
 245 PARAM3=US
 246 SPICLASSES=
 247 runTest
 248 PREFLIST=FOO
 249 PARAM1=CLDR
 250 PARAM2=en
 251 PARAM3=US
 252 SPICLASSES=
 253 runTest
 254 PREFLIST=BAR,SPI
 255 PARAM1=FALLBACK
 256 PARAM2=en
 257 PARAM3=US
 258 SPICLASSES=
 259 runTest
 260 
 261 # testing 7198834 fix. Only works on Windows Vista or upper.
 262 METHODNAME=bug7198834Test
 263 PREFLIST=HOST
 264 PARAM1=
 265 PARAM2=
 266 PARAM3=
 267 SPICLASSES=
 268 runTest
 269