Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/util/TimeZone/OldIDMappingTest.sh
38812 views
# Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.1# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.2#3# This code is free software; you can redistribute it and/or modify it4# under the terms of the GNU General Public License version 2 only, as5# published by the Free Software Foundation.6#7# This code is distributed in the hope that it will be useful, but WITHOUT8# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or9# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License10# version 2 for more details (a copy is included in the LICENSE file that11# accompanied this code).12#13# You should have received a copy of the GNU General Public License version14# 2 along with this work; if not, write to the Free Software Foundation,15# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.16#17# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA18# or visit www.oracle.com if you need additional information or have any19# questions.2021# @test22# @bug 646647623# @summary Compatibility test for the old JDK ID mapping and Olson IDs24# @build OldIDMappingTest25# @run shell OldIDMappingTest.sh2627: ${TESTJAVA:=${JAVA_HOME}}28: ${TESTCLASSES:="`pwd`"}2930JAVA="${TESTJAVA}/bin/java"3132STATUS=03334# Expecting the new (Olson compatible) mapping (default)35for I in "" " " no No NO false False FALSE Hello36do37if [ x"$I" != x ]; then38D="-Dsun.timezone.ids.oldmapping=${I}"39fi40if ! ${JAVA} ${D} ${TESTVMOPTS} -cp ${TESTCLASSES} OldIDMappingTest -new; then41STATUS=142fi43done4445# Expecting the old mapping46for I in true True TRUE yes Yes YES47do48if [ "x$I" != x ]; then49D="-Dsun.timezone.ids.oldmapping=${I}"50fi51if ! ${JAVA} ${D} ${TESTVMOPTS} -cp ${TESTCLASSES} OldIDMappingTest -old; then52STATUS=153fi54done5556exit ${STATUS}575859