提交 279a03b9 编写于 作者: N naoto

6863624: java/util/Currency/PropertiesTest.sh writable check is incorrect

Reviewed-by: alanb
上级 39aadabf
......@@ -23,7 +23,7 @@
#
# @test
# @bug 6332666 7180362 8003846
# @bug 6332666 6863624 7180362 8003846
# @summary tests the capability of replacing the currency data with user
# specified currency properties file
# @build PropertiesTest
......@@ -56,10 +56,15 @@ case "$OS" in
PS=":"
FS="/"
;;
Windows* | CYGWIN* )
Windows* )
PS=";"
FS="/"
;;
CYGWIN* )
PS=";"
FS="/"
TESTJAVA=`cygpath -u ${TESTJAVA}`
;;
* )
echo "Unrecognized system!"
exit 1;
......@@ -92,24 +97,27 @@ run PropertiesTest -c dump1 dump2 ${PROPS}
# Dump built-in currency data + overrides in properties file copied into
# JRE image.
# copy the test properties file
# Copy the test properties file. If testjava is not a typical jdk-image
# or testjava is not writable, make a private copy of it.
COPIED=0
if [ -w $TESTJAVA ]
if [ -w ${TESTJAVA}${FS}jre${FS}lib ]
then
WRITABLEJDK=$TESTJAVA
PROPLOCATION=${WRITABLEJDK}${FS}jre${FS}lib
else
WRITABLEJDK=.${FS}testjava
cp -r $TESTJAVA $WRITABLEJDK
COPIED=1
fi
if [ -d ${WRITABLEJDK}${FS}jre ]
then
if [ -d ${TESTJAVA}${FS}jre ]
then
PROPLOCATION=${WRITABLEJDK}${FS}jre${FS}lib
else
else
PROPLOCATION=${WRITABLEJDK}${FS}lib
fi
cp -r $TESTJAVA $WRITABLEJDK
chmod -R +w $WRITABLEJDK
COPIED=1
fi
cp ${PROPS} $PROPLOCATION
echo "Properties location: ${PROPLOCATION}"
# run
echo ''
......
......@@ -207,7 +207,7 @@ public class LocaleProviders {
String jreResult = "\u5e73\u6210 16.11.03 (\u6c34) \u5348\u524d 11:53:47";
Locale l = new Locale("ja", "JP", "JP");
SimpleDateFormat sdf = new SimpleDateFormat("GGGG yyyy.MMM.dd '('E')' a hh:mm:ss", l);
sdf.setTimeZone(TimeZone.getTimeZone("PST"));
sdf.setTimeZone(TimeZone.getTimeZone("America/Los_Angeles"));
String result = sdf.format(sampleDate);
System.out.println(result);
if (LocaleProviderAdapter.getAdapterPreference()
......
......@@ -24,7 +24,7 @@
#
# @test
# @bug 6336885 7196799 7197573 7198834 8000245 8000615 8001440 8010666
# 8013086 8013233 8013903
# 8013086 8013233 8013903 8015960
# @summary tests for "java.locale.providers" system property
# @compile -XDignore.symbol.file LocaleProviders.java
# @run shell/timeout=600 LocaleProviders.sh
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册