Tue, 02 Feb 2010 10:56:10 -0800
6918625: handle annotations on array class literals
Reviewed-by: jjg, darcy
Contributed-by: mali@csail.mit.edu, mernst@cs.washington.edu
1 #!/bin/sh -f
3 #
4 # Copyright 2005-2009 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 # CA 95054 USA or visit www.sun.com if you need additional information or
23 # have any questions.
24 #
26 #
27 # @test
28 # @bug 4846262
29 # @summary check that javac operates correctly in EBCDIC locale
32 if [ "${TESTSRC}" = "" ]
33 then
34 echo "TESTSRC not set. Test cannot execute. Failed."
35 exit 1
36 fi
37 echo "TESTSRC=${TESTSRC}"
38 if [ "${TESTJAVA}" = "" ]
39 then
40 echo "TESTJAVA not set. Test cannot execute. Failed."
41 exit 1
42 fi
44 # set platform-dependent variables
45 OS=`uname -s`
46 case "$OS" in
47 SunOS | Linux )
48 FS="/"
49 ;;
50 CYGWIN* )
51 FS="/"
52 DIFFOPTS="--strip-trailing-cr"
53 ;;
54 Windows* )
55 FS="\\"
56 ;;
57 * )
58 echo "Unrecognized system!"
59 exit 1;
60 ;;
61 esac
63 rm -f Test.java Test.out
65 "${TESTJAVA}${FS}bin${FS}native2ascii" ${TESTTOOLVMOPTS} -reverse -encoding IBM1047 ${TESTSRC}${FS}Test.java Test.java
67 "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -J-Duser.language=en -J-Duser.region=US -J-Dfile.encoding=IBM1047 Test.java 2>Test.tmp
69 "${TESTJAVA}${FS}bin${FS}native2ascii" ${TESTTOOLVMOPTS} -encoding IBM1047 Test.tmp Test.out
71 diff ${DIFFOPTS} -c "${TESTSRC}${FS}Test.out" Test.out
72 result=$?
74 if [ $result -eq o ]
75 then
76 echo "Passed"
77 else
78 echo "Failed"
79 fi
80 exit $result