Wed, 26 Jan 2011 13:45:25 -0800
7013272: Automatically generate info about how compiler resource keys are used
Reviewed-by: mcimadamore
1 #!/bin/sh
3 #
4 # Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 #
7 # This code is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License version 2 only, as
9 # published by the Free Software Foundation.
10 #
11 # This code is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # version 2 for more details (a copy is included in the LICENSE file that
15 # accompanied this code).
16 #
17 # You should have received a copy of the GNU General Public License version
18 # 2 along with this work; if not, write to the Free Software Foundation,
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 #
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 # or visit www.oracle.com if you need additional information or have any
23 # questions.
24 #
26 #
27 # @test
28 # @bug 4914724 4973116 5014511
29 # @summary Ensure that a supplementary character can be used as part/whole of a class
30 # name on platforms that have Unicode aware filesystems.
31 # @author Naoto Sato
32 # @run shell SupplementaryJavaID6.sh SupplementaryJavaID6
35 if [ "${TESTSRC}" = "" ]
36 then
37 echo "TESTSRC not set. Test cannot execute. Failed."
38 exit 1
39 fi
40 echo "TESTSRC=${TESTSRC}"
41 if [ "${TESTJAVA}" = "" ]
42 then
43 echo "TESTJAVA not set. Test cannot execute. Failed."
44 exit 1
45 fi
46 echo "TESTJAVA=${TESTJAVA}"
47 if [ "${TESTCLASSES}" = "" ]
48 then
49 echo "TESTCLASSES not set. Test cannot execute. Failed."
50 exit 1
51 fi
52 echo "TESTCLASSES=${TESTCLASSES}"
53 echo "CLASSPATH=${CLASSPATH}"
55 # set platform-dependent variables
56 OS=`uname -s`
57 case "$OS" in
58 SunOS | Linux )
59 if [ -d /usr/lib/locale/en_US.UTF-8 -o -d /usr/lib/locale/en_US.utf8 ]
60 then
61 ENV="env LANG=en_US.UTF-8"
62 PS=":"
63 FS="/"
64 else
65 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."
66 exit 0;
67 fi
68 ;;
69 Windows_98 | Windows_ME )
70 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."
71 exit 0;
72 ;;
73 Windows* )
74 ENV=""
75 PS=";"
76 FS="\\"
77 ;;
78 CYGWIN* )
79 ENV=""
80 PS=";" # platform PS, not cygwin PS
81 FS="/"
82 ;;
83 * )
84 echo "Unrecognized system!"
85 exit 1;
86 ;;
87 esac
89 # compile
90 cp "${TESTSRC}${FS}$1.java" .
91 ${ENV} "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d . -classpath ".${PS}${TESTSRC}" $1.java
92 result=$?
94 if [ $result -ne 0 ]
95 then
96 echo "Failed"
97 exit $result
98 fi
100 # run
101 ${ENV} "${TESTJAVA}${FS}bin${FS}java" ${TESTVMOPTS} $1
102 result=$?
104 if [ $result -eq 0 ]
105 then
106 echo "Passed"
107 else
108 echo "Failed"
109 fi
111 # Cleanup
112 ${ENV} rm -f ./$1*.class
114 exit $result