test/tools/javac/unicode/SupplementaryJavaID6.sh

changeset 1591
dc8b7aa7cef3
parent 1590
011cf7e0a148
child 1592
9345394ac8fe
     1.1 --- a/test/tools/javac/unicode/SupplementaryJavaID6.sh	Tue Feb 19 00:31:45 2013 -0800
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,114 +0,0 @@
     1.4 -#!/bin/sh
     1.5 -
     1.6 -#
     1.7 -# Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.
     1.8 -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.9 -#
    1.10 -# This code is free software; you can redistribute it and/or modify it
    1.11 -# under the terms of the GNU General Public License version 2 only, as
    1.12 -# published by the Free Software Foundation.
    1.13 -#
    1.14 -# This code is distributed in the hope that it will be useful, but WITHOUT
    1.15 -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    1.16 -# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    1.17 -# version 2 for more details (a copy is included in the LICENSE file that
    1.18 -# accompanied this code).
    1.19 -#
    1.20 -# You should have received a copy of the GNU General Public License version
    1.21 -# 2 along with this work; if not, write to the Free Software Foundation,
    1.22 -# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    1.23 -#
    1.24 -# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    1.25 -# or visit www.oracle.com if you need additional information or have any
    1.26 -# questions.
    1.27 -#
    1.28 -
    1.29 -#
    1.30 -# @test
    1.31 -# @bug 4914724 4973116 5014511
    1.32 -# @summary Ensure that a supplementary character can be used as part/whole of a class
    1.33 -#          name on platforms that have Unicode aware filesystems.
    1.34 -# @author Naoto Sato
    1.35 -# @run shell SupplementaryJavaID6.sh SupplementaryJavaID6
    1.36 -
    1.37 -
    1.38 -if [ "${TESTSRC}" = "" ]
    1.39 -then
    1.40 -  echo "TESTSRC not set.  Test cannot execute.  Failed."
    1.41 -  exit 1
    1.42 -fi
    1.43 -echo "TESTSRC=${TESTSRC}"
    1.44 -if [ "${TESTJAVA}" = "" ]
    1.45 -then
    1.46 -  echo "TESTJAVA not set.  Test cannot execute.  Failed."
    1.47 -  exit 1
    1.48 -fi
    1.49 -echo "TESTJAVA=${TESTJAVA}"
    1.50 -if [ "${TESTCLASSES}" = "" ]
    1.51 -then
    1.52 -  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
    1.53 -  exit 1
    1.54 -fi
    1.55 -echo "TESTCLASSES=${TESTCLASSES}"
    1.56 -echo "CLASSPATH=${CLASSPATH}"
    1.57 -
    1.58 -# set platform-dependent variables
    1.59 -OS=`uname -s`
    1.60 -case "$OS" in
    1.61 -  SunOS | Linux | Darwin )
    1.62 -    if [ -d /usr/lib/locale/en_US.UTF-8 -o -d /usr/lib/locale/en_US.utf8 ]
    1.63 -    then
    1.64 -        ENV="env LANG=en_US.UTF-8"
    1.65 -        PS=":"
    1.66 -        FS="/"
    1.67 -    else
    1.68 -        echo "As there is no en_US.UTF-8 locale available on this system, the compilation of the test case may or may not fail.  Ignoring this test."
    1.69 -        exit 0;
    1.70 -    fi
    1.71 -    ;;
    1.72 -  Windows_98 | Windows_ME )
    1.73 -    echo "As Windows 98/Me do not provide Unicode-aware file system, the compilation of the test case is expected to fail on these platforms.  Ignoring this test."
    1.74 -    exit 0;
    1.75 -    ;;
    1.76 -  Windows* )
    1.77 -    ENV=""
    1.78 -    PS=";"
    1.79 -    FS="\\"
    1.80 -    ;;
    1.81 -  CYGWIN* )
    1.82 -    ENV=""
    1.83 -    PS=";" # platform PS, not cygwin PS
    1.84 -    FS="/"
    1.85 -    ;;
    1.86 -  * )
    1.87 -    echo "Unrecognized system!"
    1.88 -    exit 1;
    1.89 -    ;;
    1.90 -esac
    1.91 -
    1.92 -# compile
    1.93 -cp "${TESTSRC}${FS}$1.java" .
    1.94 -${ENV} "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d . -classpath ".${PS}${TESTSRC}" $1.java
    1.95 -result=$?
    1.96 -
    1.97 -if [ $result -ne 0 ]
    1.98 -then
    1.99 -  echo "Failed"
   1.100 -  exit $result
   1.101 -fi
   1.102 -
   1.103 -# run
   1.104 -${ENV} "${TESTJAVA}${FS}bin${FS}java" ${TESTVMOPTS} $1 
   1.105 -result=$?
   1.106 -
   1.107 -if [ $result -eq 0 ]
   1.108 -then
   1.109 -  echo "Passed"
   1.110 -else
   1.111 -  echo "Failed"
   1.112 -fi
   1.113 -
   1.114 -# Cleanup
   1.115 -${ENV} rm -f ./$1*.class
   1.116 -
   1.117 -exit $result

mercurial