DefaultLocaleTest.sh revision 0
1821N/A#
1821N/A# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
3909N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1821N/A#
1821N/A# This code is free software; you can redistribute it and/or modify it
1821N/A# under the terms of the GNU General Public License version 2 only, as
1821N/A# published by the Free Software Foundation.
2362N/A#
1821N/A# This code is distributed in the hope that it will be useful, but WITHOUT
2362N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1821N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1821N/A# version 2 for more details (a copy is included in the LICENSE file that
1821N/A# accompanied this code).
1821N/A#
1821N/A# You should have received a copy of the GNU General Public License version
1821N/A# 2 along with this work; if not, write to the Free Software Foundation,
1821N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1821N/A#
1821N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
1821N/A# CA 95054 USA or visit www.sun.com if you need additional information or
1821N/A# have any questions.
2362N/A#
2362N/A
2362N/A# @test
1821N/A# @bug 4958170 4891531 4989534
1821N/A# @summary Test to see if default java locale settings are identical
1821N/A# when launch jvm from java and javaw respectively. Test
1821N/A# should be run on Windows with different user locale and
1821N/A# system locale setting in ControlPanel's RegionSetting.
1821N/A# Following 2 testing scenarios are recommended
1821N/A# (1)systemLocale=Japanese, userLocale=English
1821N/A# (2)systemLocale=English, userLocale=Japanese
1821N/A# @run shell DefaultLocaleTest.sh
1821N/A#
1821N/A# Verify directory context variables are set
1821N/Aif [ "${TESTJAVA}" = "" ]
1821N/Athen
1821N/A echo "TESTJAVA not set. Test cannot execute. Failed."
1821N/A exit 1
1821N/Afi
1821N/A
1821N/Aif [ "${TESTSRC}" = "" ]
1821N/Athen
3589N/A echo "TESTSRC not set. Test cannot execute. Failed."
1821N/A exit 1
4632N/Afi
4632N/A
4632N/AOS=`uname`
4632N/A
4632N/Acase "$OS" in
3589N/A Windows* | CYGWIN* )
1821N/A JAVAC="${TESTJAVA}/bin/javac -d . "
1821N/A JAVA="${TESTJAVA}/bin/java -classpath . "
1821N/A JAVAW="${TESTJAVA}/bin/javaw -classpath . "
1821N/A
1821N/A ${JAVAC} ${TESTSRC}/DefaultLocaleTest.java
1821N/A props=`${JAVA} DefaultLocaleTest`
1821N/A ${JAVAW} DefaultLocaleTest $props
1821N/A if [ $? -ne 0 ]
1821N/A then
1821N/A echo "Test fails"
1821N/A exit 1
1821N/A fi
1821N/A echo "Test passes"
1821N/A exit 0
1821N/A ;;
1821N/A * )
1821N/A echo "Non-windows environment; test vacuously succeeds."
1821N/A exit 0;
1821N/A ;;
1821N/Aesac
1821N/A
1821N/A
1821N/A
1821N/A