test/tools/javac/4846262/Test.sh

Mon, 14 Mar 2011 11:42:15 -0700

author
jjg
date
Mon, 14 Mar 2011 11:42:15 -0700
changeset 929
e2890b8369f7
parent 554
9d9f26857129
child 1159
4261dc8af622
permissions
-rw-r--r--

7010608: the string 'error' should appear in error messages
Reviewed-by: mcimadamore

     1 #!/bin/sh -f
     3 #
     4 # Copyright (c) 2005, 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 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

mercurial