2013-06-03 14:44:10 +00:00
|
|
|
#!/bin/sh
|
2012-08-21 18:00:30 +00:00
|
|
|
#
|
2016-01-05 18:15:54 +00:00
|
|
|
# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
2012-08-21 18:00:30 +00:00
|
|
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
#
|
|
|
|
# This code is free software; you can redistribute it and/or modify it
|
|
|
|
# under the terms of the GNU General Public License version 2 only, as
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
# version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
# accompanied this code).
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License version
|
|
|
|
# 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
#
|
|
|
|
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
# or visit www.oracle.com if you need additional information or have any
|
|
|
|
# questions.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# @test
|
2015-06-24 23:42:11 +00:00
|
|
|
# @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8008577
|
2016-01-05 18:15:54 +00:00
|
|
|
# 8010666 8013086 8013233 8013903 8015960 8028771 8054482 8062006
|
2016-03-29 02:47:03 +00:00
|
|
|
# 8150432
|
2012-08-21 18:00:30 +00:00
|
|
|
# @summary tests for "java.locale.providers" system property
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Alexandr Scherbatiy <alexandr.scherbatiy@oracle.com>
Co-authored-by: Amy Lu <amy.lu@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Miroslav Kos <miroslav.kos@oracle.com>
Co-authored-by: Huaming Li <huaming.li@oracle.com>
Co-authored-by: Sean Mullan <sean.mullan@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Masayoshi Okutsu <masayoshi.okutsu@oracle.com>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Claes Redestad <claes.redestad@oracle.com>
Co-authored-by: Sergey Bylokhov <sergey.bylokhov@oracle.com>
Co-authored-by: Alexandre Iline <alexandre.iline@oracle.com>
Co-authored-by: Volker Simonis <volker.simonis@gmail.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Stuart Marks <stuart.marks@oracle.com>
Co-authored-by: Semyon Sadetsky <semyon.sadetsky@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Co-authored-by: Valerie Peng <valerie.peng@oracle.com>
Co-authored-by: Vincent Ryan <vincent.x.ryan@oracle.com>
Co-authored-by: Weijun Wang <weijun.wang@oracle.com>
Co-authored-by: Yuri Nesterenko <yuri.nesterenko@oracle.com>
Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
Co-authored-by: Alexander Kulyakthin <alexander.kulyakhtin@oracle.com>
Co-authored-by: Felix Yang <felix.yang@oracle.com>
Co-authored-by: Andrei Eremeev <andrei.eremeev@oracle.com>
Co-authored-by: Frank Yuan <frank.yuan@oracle.com>
Co-authored-by: Sergei Pikalev <sergei.pikalev@oracle.com>
Co-authored-by: Sibabrata Sahoo <sibabrata.sahoo@oracle.com>
Co-authored-by: Tiantian Du <tiantian.du@oracle.com>
Co-authored-by: Sha Jiang <sha.jiang@oracle.com>
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
2016-03-17 19:04:16 +00:00
|
|
|
# @modules java.base/sun.util.locale
|
|
|
|
# java.base/sun.util.locale.provider
|
|
|
|
# @compile LocaleProviders.java
|
2012-08-21 18:00:30 +00:00
|
|
|
# @run shell/timeout=600 LocaleProviders.sh
|
|
|
|
|
|
|
|
if [ "${TESTSRC}" = "" ]
|
|
|
|
then
|
|
|
|
echo "TESTSRC not set. Test cannot execute. Failed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "TESTSRC=${TESTSRC}"
|
|
|
|
if [ "${TESTJAVA}" = "" ]
|
|
|
|
then
|
|
|
|
echo "TESTJAVA not set. Test cannot execute. Failed."
|
|
|
|
exit 1
|
|
|
|
fi
|
2013-01-11 20:19:55 +00:00
|
|
|
if [ "${COMPILEJAVA}" = "" ]
|
|
|
|
then
|
|
|
|
COMPILEJAVA="${TESTJAVA}"
|
|
|
|
fi
|
2012-08-21 18:00:30 +00:00
|
|
|
echo "TESTJAVA=${TESTJAVA}"
|
|
|
|
if [ "${TESTCLASSES}" = "" ]
|
|
|
|
then
|
|
|
|
echo "TESTCLASSES not set. Test cannot execute. Failed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo "TESTCLASSES=${TESTCLASSES}"
|
|
|
|
echo "CLASSPATH=${CLASSPATH}"
|
|
|
|
|
|
|
|
# set platform-dependent variables
|
|
|
|
OS=`uname -s`
|
|
|
|
case "$OS" in
|
2014-01-17 20:54:30 +00:00
|
|
|
SunOS | Linux | *BSD | Darwin | AIX )
|
2012-08-21 18:00:30 +00:00
|
|
|
PS=":"
|
|
|
|
FS="/"
|
|
|
|
;;
|
|
|
|
Windows* | CYGWIN* )
|
|
|
|
PS=";"
|
|
|
|
FS="\\"
|
|
|
|
;;
|
|
|
|
* )
|
|
|
|
echo "Unrecognized system!"
|
|
|
|
exit 1;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2013-05-07 18:31:08 +00:00
|
|
|
# create SPI implementations
|
2012-10-16 17:59:21 +00:00
|
|
|
mk() {
|
|
|
|
d=`dirname $1`
|
|
|
|
if [ ! -d $d ]; then mkdir -p $d; fi
|
|
|
|
cat - >$1
|
|
|
|
}
|
|
|
|
|
|
|
|
SPIDIR=${TESTCLASSES}${FS}spi
|
|
|
|
rm -rf ${SPIDIR}
|
|
|
|
mk ${SPIDIR}${FS}src${FS}tznp.java << EOF
|
|
|
|
import java.util.spi.TimeZoneNameProvider;
|
|
|
|
import java.util.Locale;
|
|
|
|
|
|
|
|
public class tznp extends TimeZoneNameProvider {
|
|
|
|
public String getDisplayName(String ID, boolean daylight, int style, Locale locale) {
|
|
|
|
return "tznp";
|
|
|
|
}
|
|
|
|
|
|
|
|
public Locale[] getAvailableLocales() {
|
2013-05-07 18:31:08 +00:00
|
|
|
Locale[] locales = {Locale.US};
|
|
|
|
return locales;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
mk ${SPIDIR}${FS}src${FS}tznp8013086.java << EOF
|
|
|
|
import java.util.spi.TimeZoneNameProvider;
|
|
|
|
import java.util.Locale;
|
|
|
|
import java.util.TimeZone;
|
|
|
|
|
|
|
|
public class tznp8013086 extends TimeZoneNameProvider {
|
|
|
|
public String getDisplayName(String ID, boolean daylight, int style, Locale locale) {
|
|
|
|
if (!daylight && style==TimeZone.LONG) {
|
|
|
|
return "tznp8013086";
|
|
|
|
} else {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public Locale[] getAvailableLocales() {
|
|
|
|
Locale[] locales = {Locale.JAPAN};
|
2012-10-16 17:59:21 +00:00
|
|
|
return locales;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
mk ${SPIDIR}${FS}dest${FS}META-INF${FS}services${FS}java.util.spi.TimeZoneNameProvider << EOF
|
|
|
|
tznp
|
2013-05-07 18:31:08 +00:00
|
|
|
tznp8013086
|
2012-10-16 17:59:21 +00:00
|
|
|
EOF
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Alexandr Scherbatiy <alexandr.scherbatiy@oracle.com>
Co-authored-by: Amy Lu <amy.lu@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Miroslav Kos <miroslav.kos@oracle.com>
Co-authored-by: Huaming Li <huaming.li@oracle.com>
Co-authored-by: Sean Mullan <sean.mullan@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Masayoshi Okutsu <masayoshi.okutsu@oracle.com>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Claes Redestad <claes.redestad@oracle.com>
Co-authored-by: Sergey Bylokhov <sergey.bylokhov@oracle.com>
Co-authored-by: Alexandre Iline <alexandre.iline@oracle.com>
Co-authored-by: Volker Simonis <volker.simonis@gmail.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Stuart Marks <stuart.marks@oracle.com>
Co-authored-by: Semyon Sadetsky <semyon.sadetsky@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Co-authored-by: Valerie Peng <valerie.peng@oracle.com>
Co-authored-by: Vincent Ryan <vincent.x.ryan@oracle.com>
Co-authored-by: Weijun Wang <weijun.wang@oracle.com>
Co-authored-by: Yuri Nesterenko <yuri.nesterenko@oracle.com>
Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
Co-authored-by: Alexander Kulyakthin <alexander.kulyakhtin@oracle.com>
Co-authored-by: Felix Yang <felix.yang@oracle.com>
Co-authored-by: Andrei Eremeev <andrei.eremeev@oracle.com>
Co-authored-by: Frank Yuan <frank.yuan@oracle.com>
Co-authored-by: Sergei Pikalev <sergei.pikalev@oracle.com>
Co-authored-by: Sibabrata Sahoo <sibabrata.sahoo@oracle.com>
Co-authored-by: Tiantian Du <tiantian.du@oracle.com>
Co-authored-by: Sha Jiang <sha.jiang@oracle.com>
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
2016-03-17 19:04:16 +00:00
|
|
|
|
2016-08-10 22:51:25 +00:00
|
|
|
EXTRAOPTS="--add-exports java.base/sun.util.locale=ALL-UNNAMED \
|
|
|
|
--add-exports java.base/sun.util.locale.provider=ALL-UNNAMED"
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Alexandr Scherbatiy <alexandr.scherbatiy@oracle.com>
Co-authored-by: Amy Lu <amy.lu@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Miroslav Kos <miroslav.kos@oracle.com>
Co-authored-by: Huaming Li <huaming.li@oracle.com>
Co-authored-by: Sean Mullan <sean.mullan@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Masayoshi Okutsu <masayoshi.okutsu@oracle.com>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Claes Redestad <claes.redestad@oracle.com>
Co-authored-by: Sergey Bylokhov <sergey.bylokhov@oracle.com>
Co-authored-by: Alexandre Iline <alexandre.iline@oracle.com>
Co-authored-by: Volker Simonis <volker.simonis@gmail.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Stuart Marks <stuart.marks@oracle.com>
Co-authored-by: Semyon Sadetsky <semyon.sadetsky@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Co-authored-by: Valerie Peng <valerie.peng@oracle.com>
Co-authored-by: Vincent Ryan <vincent.x.ryan@oracle.com>
Co-authored-by: Weijun Wang <weijun.wang@oracle.com>
Co-authored-by: Yuri Nesterenko <yuri.nesterenko@oracle.com>
Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
Co-authored-by: Alexander Kulyakthin <alexander.kulyakhtin@oracle.com>
Co-authored-by: Felix Yang <felix.yang@oracle.com>
Co-authored-by: Andrei Eremeev <andrei.eremeev@oracle.com>
Co-authored-by: Frank Yuan <frank.yuan@oracle.com>
Co-authored-by: Sergei Pikalev <sergei.pikalev@oracle.com>
Co-authored-by: Sibabrata Sahoo <sibabrata.sahoo@oracle.com>
Co-authored-by: Tiantian Du <tiantian.du@oracle.com>
Co-authored-by: Sha Jiang <sha.jiang@oracle.com>
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
2016-03-17 19:04:16 +00:00
|
|
|
|
2013-01-11 20:19:55 +00:00
|
|
|
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${SPIDIR}${FS}dest \
|
2013-05-07 18:31:08 +00:00
|
|
|
${SPIDIR}${FS}src${FS}tznp.java \
|
|
|
|
${SPIDIR}${FS}src${FS}tznp8013086.java
|
2013-01-11 20:19:55 +00:00
|
|
|
${COMPILEJAVA}${FS}bin${FS}jar ${TESTTOOLVMOPTS} cvf ${SPIDIR}${FS}tznp.jar -C ${SPIDIR}${FS}dest .
|
2012-10-16 17:59:21 +00:00
|
|
|
|
2012-10-05 16:57:50 +00:00
|
|
|
# get the platform default locales
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Alexandr Scherbatiy <alexandr.scherbatiy@oracle.com>
Co-authored-by: Amy Lu <amy.lu@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Miroslav Kos <miroslav.kos@oracle.com>
Co-authored-by: Huaming Li <huaming.li@oracle.com>
Co-authored-by: Sean Mullan <sean.mullan@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Masayoshi Okutsu <masayoshi.okutsu@oracle.com>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Claes Redestad <claes.redestad@oracle.com>
Co-authored-by: Sergey Bylokhov <sergey.bylokhov@oracle.com>
Co-authored-by: Alexandre Iline <alexandre.iline@oracle.com>
Co-authored-by: Volker Simonis <volker.simonis@gmail.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Stuart Marks <stuart.marks@oracle.com>
Co-authored-by: Semyon Sadetsky <semyon.sadetsky@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Co-authored-by: Valerie Peng <valerie.peng@oracle.com>
Co-authored-by: Vincent Ryan <vincent.x.ryan@oracle.com>
Co-authored-by: Weijun Wang <weijun.wang@oracle.com>
Co-authored-by: Yuri Nesterenko <yuri.nesterenko@oracle.com>
Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
Co-authored-by: Alexander Kulyakthin <alexander.kulyakhtin@oracle.com>
Co-authored-by: Felix Yang <felix.yang@oracle.com>
Co-authored-by: Andrei Eremeev <andrei.eremeev@oracle.com>
Co-authored-by: Frank Yuan <frank.yuan@oracle.com>
Co-authored-by: Sergei Pikalev <sergei.pikalev@oracle.com>
Co-authored-by: Sibabrata Sahoo <sibabrata.sahoo@oracle.com>
Co-authored-by: Tiantian Du <tiantian.du@oracle.com>
Co-authored-by: Sha Jiang <sha.jiang@oracle.com>
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
2016-03-17 19:04:16 +00:00
|
|
|
PLATDEF=`${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${EXTRAOPTS} -classpath ${TESTCLASSES} LocaleProviders getPlatformLocale display`
|
2012-10-04 17:04:56 +00:00
|
|
|
DEFLANG=`echo ${PLATDEF} | sed -e "s/,.*//"`
|
|
|
|
DEFCTRY=`echo ${PLATDEF} | sed -e "s/.*,//"`
|
|
|
|
echo "DEFLANG=${DEFLANG}"
|
|
|
|
echo "DEFCTRY=${DEFCTRY}"
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Alexandr Scherbatiy <alexandr.scherbatiy@oracle.com>
Co-authored-by: Amy Lu <amy.lu@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Miroslav Kos <miroslav.kos@oracle.com>
Co-authored-by: Huaming Li <huaming.li@oracle.com>
Co-authored-by: Sean Mullan <sean.mullan@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Masayoshi Okutsu <masayoshi.okutsu@oracle.com>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Claes Redestad <claes.redestad@oracle.com>
Co-authored-by: Sergey Bylokhov <sergey.bylokhov@oracle.com>
Co-authored-by: Alexandre Iline <alexandre.iline@oracle.com>
Co-authored-by: Volker Simonis <volker.simonis@gmail.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Stuart Marks <stuart.marks@oracle.com>
Co-authored-by: Semyon Sadetsky <semyon.sadetsky@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Co-authored-by: Valerie Peng <valerie.peng@oracle.com>
Co-authored-by: Vincent Ryan <vincent.x.ryan@oracle.com>
Co-authored-by: Weijun Wang <weijun.wang@oracle.com>
Co-authored-by: Yuri Nesterenko <yuri.nesterenko@oracle.com>
Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
Co-authored-by: Alexander Kulyakthin <alexander.kulyakhtin@oracle.com>
Co-authored-by: Felix Yang <felix.yang@oracle.com>
Co-authored-by: Andrei Eremeev <andrei.eremeev@oracle.com>
Co-authored-by: Frank Yuan <frank.yuan@oracle.com>
Co-authored-by: Sergei Pikalev <sergei.pikalev@oracle.com>
Co-authored-by: Sibabrata Sahoo <sibabrata.sahoo@oracle.com>
Co-authored-by: Tiantian Du <tiantian.du@oracle.com>
Co-authored-by: Sha Jiang <sha.jiang@oracle.com>
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
2016-03-17 19:04:16 +00:00
|
|
|
PLATDEF=`${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${EXTRAOPTS} -classpath ${TESTCLASSES} LocaleProviders getPlatformLocale format`
|
2012-10-05 16:57:50 +00:00
|
|
|
DEFFMTLANG=`echo ${PLATDEF} | sed -e "s/,.*//"`
|
|
|
|
DEFFMTCTRY=`echo ${PLATDEF} | sed -e "s/.*,//"`
|
|
|
|
echo "DEFFMTLANG=${DEFFMTLANG}"
|
|
|
|
echo "DEFFMTCTRY=${DEFFMTCTRY}"
|
2012-10-04 17:04:56 +00:00
|
|
|
|
2012-08-21 18:00:30 +00:00
|
|
|
runTest()
|
|
|
|
{
|
8142968: Module System implementation
Initial integration of JEP 200, JEP 260, JEP 261, and JEP 282
Co-authored-by: Alex Buckley <alex.buckley@oracle.com>
Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com>
Co-authored-by: Karen Kinnear <karen.kinnear@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Mark Reinhold <mark.reinhold@oracle.com>
Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com>
Co-authored-by: Alexandr Scherbatiy <alexandr.scherbatiy@oracle.com>
Co-authored-by: Amy Lu <amy.lu@oracle.com>
Co-authored-by: Calvin Cheung <calvin.cheung@oracle.com>
Co-authored-by: Daniel Fuchs <daniel.fuchs@oracle.com>
Co-authored-by: Erik Joelsson <erik.joelsson@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@oracle.com>
Co-authored-by: Jean-Francois Denise <jean-francois.denise@oracle.com>
Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com>
Co-authored-by: James Laskey <james.laskey@oracle.com>
Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Miroslav Kos <miroslav.kos@oracle.com>
Co-authored-by: Huaming Li <huaming.li@oracle.com>
Co-authored-by: Sean Mullan <sean.mullan@oracle.com>
Co-authored-by: Naoto Sato <naoto.sato@oracle.com>
Co-authored-by: Masayoshi Okutsu <masayoshi.okutsu@oracle.com>
Co-authored-by: Peter Levart <peter.levart@gmail.com>
Co-authored-by: Philip Race <philip.race@oracle.com>
Co-authored-by: Claes Redestad <claes.redestad@oracle.com>
Co-authored-by: Sergey Bylokhov <sergey.bylokhov@oracle.com>
Co-authored-by: Alexandre Iline <alexandre.iline@oracle.com>
Co-authored-by: Volker Simonis <volker.simonis@gmail.com>
Co-authored-by: Staffan Larsen <staffan.larsen@oracle.com>
Co-authored-by: Stuart Marks <stuart.marks@oracle.com>
Co-authored-by: Semyon Sadetsky <semyon.sadetsky@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: Sundararajan Athijegannathan <sundararajan.athijegannathan@oracle.com>
Co-authored-by: Valerie Peng <valerie.peng@oracle.com>
Co-authored-by: Vincent Ryan <vincent.x.ryan@oracle.com>
Co-authored-by: Weijun Wang <weijun.wang@oracle.com>
Co-authored-by: Yuri Nesterenko <yuri.nesterenko@oracle.com>
Co-authored-by: Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
Co-authored-by: Alexander Kulyakthin <alexander.kulyakhtin@oracle.com>
Co-authored-by: Felix Yang <felix.yang@oracle.com>
Co-authored-by: Andrei Eremeev <andrei.eremeev@oracle.com>
Co-authored-by: Frank Yuan <frank.yuan@oracle.com>
Co-authored-by: Sergei Pikalev <sergei.pikalev@oracle.com>
Co-authored-by: Sibabrata Sahoo <sibabrata.sahoo@oracle.com>
Co-authored-by: Tiantian Du <tiantian.du@oracle.com>
Co-authored-by: Sha Jiang <sha.jiang@oracle.com>
Reviewed-by: alanb, mchung, naoto, rriggs, psandoz, plevart, mullan, ascarpino, vinnie, prr, sherman, dfuchs, mhaupt
2016-03-17 19:04:16 +00:00
|
|
|
RUNCMD="${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${EXTRAOPTS} -classpath ${TESTCLASSES}${PS}${SPICLASSES} -Djava.locale.providers=$PREFLIST LocaleProviders $METHODNAME $PARAM1 $PARAM2 $PARAM3"
|
2012-08-21 18:00:30 +00:00
|
|
|
echo ${RUNCMD}
|
|
|
|
${RUNCMD}
|
|
|
|
result=$?
|
|
|
|
if [ $result -eq 0 ]
|
|
|
|
then
|
|
|
|
echo "Execution successful"
|
|
|
|
else
|
|
|
|
echo "Execution of the test case failed."
|
|
|
|
exit $result
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# testing HOST is selected for the default locale, if specified on Windows or MacOSX
|
2012-10-05 16:57:50 +00:00
|
|
|
METHODNAME=adapterTest
|
2012-10-04 17:04:56 +00:00
|
|
|
PREFLIST=HOST,JRE
|
2012-08-21 18:00:30 +00:00
|
|
|
case "$OS" in
|
|
|
|
Windows_NT* )
|
|
|
|
WINVER=`uname -r`
|
|
|
|
if [ "${WINVER}" = "5" ]
|
|
|
|
then
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=JRE
|
2012-08-21 18:00:30 +00:00
|
|
|
else
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=HOST
|
2012-08-21 18:00:30 +00:00
|
|
|
fi
|
|
|
|
;;
|
2016-03-28 07:06:33 +00:00
|
|
|
CYGWIN_NT-6* | CYGWIN_NT-10* | Darwin )
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=HOST
|
2012-08-21 18:00:30 +00:00
|
|
|
;;
|
|
|
|
* )
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=JRE
|
2012-08-21 18:00:30 +00:00
|
|
|
;;
|
|
|
|
esac
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM2=${DEFLANG}
|
|
|
|
PARAM3=${DEFCTRY}
|
2012-08-21 18:00:30 +00:00
|
|
|
runTest
|
|
|
|
|
|
|
|
# testing HOST is NOT selected for the non-default locale, if specified
|
2012-10-05 16:57:50 +00:00
|
|
|
METHODNAME=adapterTest
|
2012-10-04 17:04:56 +00:00
|
|
|
PREFLIST=HOST,JRE
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=JRE
|
|
|
|
# Try to find the locale JRE supports which is not the platform default (HOST supports that one)
|
|
|
|
if [ "${DEFLANG}" != "en" ] && [ "${DEFFMTLANG}" != "en" ]; then
|
|
|
|
PARAM2=en
|
|
|
|
PARAM3=US
|
2015-11-02 16:46:19 +00:00
|
|
|
elif [ "${DEFLANG}" != "ja" ] && [ "${DEFFMTLANG}" != "ja" ]; then
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM2=ja
|
|
|
|
PARAM3=JP
|
2012-10-04 17:04:56 +00:00
|
|
|
else
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM2=zh
|
|
|
|
PARAM3=CN
|
2012-10-04 17:04:56 +00:00
|
|
|
fi
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-08-21 18:00:30 +00:00
|
|
|
runTest
|
|
|
|
|
|
|
|
# testing SPI is NOT selected, as there is none.
|
2012-10-05 16:57:50 +00:00
|
|
|
METHODNAME=adapterTest
|
2012-10-04 17:04:56 +00:00
|
|
|
PREFLIST=SPI,JRE
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=JRE
|
|
|
|
PARAM2=en
|
|
|
|
PARAM3=US
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-08-21 18:00:30 +00:00
|
|
|
runTest
|
2015-11-02 16:46:19 +00:00
|
|
|
PREFLIST=SPI,COMPAT
|
|
|
|
runTest
|
2012-08-21 18:00:30 +00:00
|
|
|
|
|
|
|
# testing the order, variaton #1. This assumes en_GB DateFormat data are available both in JRE & CLDR
|
2012-10-05 16:57:50 +00:00
|
|
|
METHODNAME=adapterTest
|
2012-10-04 17:04:56 +00:00
|
|
|
PREFLIST=CLDR,JRE
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=CLDR
|
|
|
|
PARAM2=en
|
|
|
|
PARAM3=GB
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-08-21 18:00:30 +00:00
|
|
|
runTest
|
2015-11-02 16:46:19 +00:00
|
|
|
PREFLIST=CLDR,COMPAT
|
|
|
|
runTest
|
2012-08-21 18:00:30 +00:00
|
|
|
|
|
|
|
# testing the order, variaton #2. This assumes en_GB DateFormat data are available both in JRE & CLDR
|
2012-10-05 16:57:50 +00:00
|
|
|
METHODNAME=adapterTest
|
2012-08-21 18:00:30 +00:00
|
|
|
PREFLIST=JRE,CLDR
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=JRE
|
|
|
|
PARAM2=en
|
|
|
|
PARAM3=GB
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-08-21 18:00:30 +00:00
|
|
|
runTest
|
2015-11-02 16:46:19 +00:00
|
|
|
PREFLIST=COMPAT,CLDR
|
|
|
|
runTest
|
2012-08-21 18:00:30 +00:00
|
|
|
|
|
|
|
# testing the order, variaton #3 for non-existent locale in JRE assuming "haw" is not in JRE.
|
2012-10-05 16:57:50 +00:00
|
|
|
METHODNAME=adapterTest
|
2012-08-21 18:00:30 +00:00
|
|
|
PREFLIST=JRE,CLDR
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=CLDR
|
|
|
|
PARAM2=haw
|
2015-06-24 23:42:11 +00:00
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-08-21 18:00:30 +00:00
|
|
|
runTest
|
2015-11-02 16:46:19 +00:00
|
|
|
PREFLIST=COMPAT,CLDR
|
|
|
|
runTest
|
2012-08-21 18:00:30 +00:00
|
|
|
|
2012-10-04 17:04:56 +00:00
|
|
|
# testing the order, variaton #4 for the bug 7196799. CLDR's "zh" data should be used in "zh_CN"
|
2012-10-05 16:57:50 +00:00
|
|
|
METHODNAME=adapterTest
|
2012-10-04 17:04:56 +00:00
|
|
|
PREFLIST=CLDR
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=CLDR
|
|
|
|
PARAM2=zh
|
|
|
|
PARAM3=CN
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-10-04 17:04:56 +00:00
|
|
|
runTest
|
|
|
|
|
|
|
|
# testing FALLBACK provider. SPI and invalid one cases.
|
2012-10-05 16:57:50 +00:00
|
|
|
METHODNAME=adapterTest
|
2012-10-04 17:04:56 +00:00
|
|
|
PREFLIST=SPI
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=FALLBACK
|
|
|
|
PARAM2=en
|
|
|
|
PARAM3=US
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-10-04 17:04:56 +00:00
|
|
|
runTest
|
|
|
|
PREFLIST=FOO
|
2015-06-24 23:42:11 +00:00
|
|
|
PARAM1=CLDR
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM2=en
|
|
|
|
PARAM3=US
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-10-04 17:04:56 +00:00
|
|
|
runTest
|
|
|
|
PREFLIST=BAR,SPI
|
2012-10-05 16:57:50 +00:00
|
|
|
PARAM1=FALLBACK
|
|
|
|
PARAM2=en
|
|
|
|
PARAM3=US
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-10-05 16:57:50 +00:00
|
|
|
runTest
|
|
|
|
|
|
|
|
# testing 7198834 fix. Only works on Windows Vista or upper.
|
|
|
|
METHODNAME=bug7198834Test
|
|
|
|
PREFLIST=HOST
|
|
|
|
PARAM1=
|
|
|
|
PARAM2=
|
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-10-04 17:04:56 +00:00
|
|
|
runTest
|
|
|
|
|
2012-10-16 17:59:21 +00:00
|
|
|
# testing 8000245 fix.
|
|
|
|
METHODNAME=tzNameTest
|
2014-12-16 20:48:31 +00:00
|
|
|
PREFLIST=JRE
|
2012-10-16 17:59:21 +00:00
|
|
|
PARAM1=Europe/Moscow
|
|
|
|
PARAM2=
|
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=${SPIDIR}
|
2012-10-16 17:59:21 +00:00
|
|
|
runTest
|
2015-11-02 16:46:19 +00:00
|
|
|
PREFLIST=COMPAT
|
|
|
|
runTest
|
2012-10-16 17:59:21 +00:00
|
|
|
|
|
|
|
# testing 8000615 fix.
|
|
|
|
METHODNAME=tzNameTest
|
2014-12-16 20:48:31 +00:00
|
|
|
PREFLIST=JRE
|
2012-10-16 17:59:21 +00:00
|
|
|
PARAM1=America/Los_Angeles
|
|
|
|
PARAM2=
|
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=${SPIDIR}
|
2012-10-16 17:59:21 +00:00
|
|
|
runTest
|
2015-11-02 16:46:19 +00:00
|
|
|
PREFLIST=COMPAT
|
|
|
|
runTest
|
2012-10-16 17:59:21 +00:00
|
|
|
|
2012-11-01 20:28:47 +00:00
|
|
|
# testing 8001440 fix.
|
|
|
|
METHODNAME=bug8001440Test
|
|
|
|
PREFLIST=CLDR
|
|
|
|
PARAM1=
|
|
|
|
PARAM2=
|
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2012-11-01 20:28:47 +00:00
|
|
|
runTest
|
|
|
|
|
2013-04-22 20:37:07 +00:00
|
|
|
# testing 8010666 fix.
|
|
|
|
if [ "${DEFLANG}" = "en" ]
|
|
|
|
then
|
|
|
|
METHODNAME=bug8010666Test
|
|
|
|
PREFLIST=HOST
|
|
|
|
PARAM1=
|
|
|
|
PARAM2=
|
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2013-04-22 20:37:07 +00:00
|
|
|
runTest
|
|
|
|
fi
|
|
|
|
|
2013-05-07 18:31:08 +00:00
|
|
|
# testing 8013086 fix.
|
|
|
|
METHODNAME=bug8013086Test
|
2014-12-16 20:48:31 +00:00
|
|
|
PREFLIST=JRE,SPI
|
2013-05-07 18:31:08 +00:00
|
|
|
PARAM1=ja
|
|
|
|
PARAM2=JP
|
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=${SPIDIR}
|
2013-05-07 18:31:08 +00:00
|
|
|
runTest
|
2015-11-02 16:46:19 +00:00
|
|
|
PREFLIST=COMPAT,SPI
|
|
|
|
runTest
|
2013-05-07 18:31:08 +00:00
|
|
|
|
2013-06-04 17:33:13 +00:00
|
|
|
# testing 8013903 fix. (Windows only)
|
|
|
|
METHODNAME=bug8013903Test
|
|
|
|
PREFLIST=HOST,JRE
|
|
|
|
PARAM1=
|
|
|
|
PARAM2=
|
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2013-06-04 17:33:13 +00:00
|
|
|
runTest
|
|
|
|
PREFLIST=HOST
|
2015-11-02 16:46:19 +00:00
|
|
|
runTest
|
|
|
|
PREFLIST=HOST,COMPAT
|
2013-06-04 17:33:13 +00:00
|
|
|
runTest
|
|
|
|
|
2014-02-19 17:17:28 +00:00
|
|
|
# testing 8027289 fix, if the platform format default is zh_CN
|
|
|
|
# this assumes Windows' currency symbol for zh_CN is \u00A5, the yen
|
|
|
|
# (yuan) sign.
|
|
|
|
if [ "${DEFFMTLANG}" = "zh" ] && [ "${DEFFMTCTRY}" = "CN" ]; then
|
|
|
|
METHODNAME=bug8027289Test
|
|
|
|
PREFLIST=JRE,HOST
|
|
|
|
PARAM1=FFE5
|
|
|
|
PARAM2=
|
|
|
|
PARAM3=
|
2014-12-16 20:48:31 +00:00
|
|
|
SPICLASSES=
|
2014-02-19 17:17:28 +00:00
|
|
|
runTest
|
2015-11-02 16:46:19 +00:00
|
|
|
PREFLIST=COMPAT,HOST
|
|
|
|
runTest
|
2014-02-19 17:17:28 +00:00
|
|
|
PREFLIST=HOST
|
|
|
|
PARAM1=00A5
|
|
|
|
runTest
|
|
|
|
fi
|
|
|
|
|
2012-08-21 18:00:30 +00:00
|
|
|
exit $result
|