./test/java/awt/appletviewer/IOExceptionIfEncodedURLTest/IOExceptionIfEncodedURLTest.sh

Print this page
rev 5948 : Fix for JDK-7072120
   1 #
   2 # Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  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


  82    if [ $? = 0 ] ;
  83        then fail "test failed for "${URL}": syntax errors or inaccessible files"
  84    fi
  85 
  86    if [ $started = "0" ];
  87        then echo "the test passed for "${URL}
  88        else fail "test failed for "${URL}": the appletviewer behaviour is unexpected: "$started", see err file"
  89    fi
  90  }
  91 
  92 # end of subroutines
  93 
  94 
  95 # The beginning of the script proper
  96 
  97 # Checking for proper OS
  98 OS=`uname -s`
  99 case "$OS" in
 100    SunOS )
 101       VAR="One value for Sun"
 102       DEFAULT_JDK=/usr/local/java/jdk1.2.1/solaris
 103       FILESEP="/"


 104       ;;
 105 
 106    Linux )
 107       VAR="A different value for Linux"
 108       DEFAULT_JDK=/usr/local/java/jdk1.4/linux-i386
 109       FILESEP="/"


 110       ;;
 111 
 112    Windows_95 | Windows_98 | Windows_NT | Windows_ME | CYGWIN_NT-5.1)








 113       VAR="A different value for Win32"
 114       DEFAULT_JDK=/usr/local/java/jdk1.2.1/win32
 115       FILESEP="\\"


 116       ;;
 117 








 118    # catch all other OSs
 119    * )
 120       echo "Unrecognized system!  $OS"
 121       fail "Unrecognized system!  $OS"
 122       ;;
 123 esac
 124 
 125 # 6438730: Only a minimal set of env variables are set for shell tests.
 126 # To guarantee that env variable holds correct value we need to set it ourselves.
 127 if [ -z "${PWD}" ] ; then
 128     PWD=`pwd`
 129 fi
 130 
 131 # check that some executable or other file you need is available, abort if not
 132 #  note that the name of the executable is in the fail string as well.
 133 # this is how to check for presence of the compiler, etc.
 134 #RESOURCE=`whence SomeProgramOrFileNeeded`
 135 #if [ "${RESOURCE}" = "" ] ; 
 136 #   then fail "Need SomeProgramOrFileNeeded to perform the test" ; 
 137 #fi


   1 #
   2 # Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
   3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4 #
   5 # This code is free software; you can redistribute it and/or modify it
   6 # under the terms of the GNU General Public License version 2 only, as
   7 # published by the Free Software Foundation.  Oracle designates this
   8 # particular file as subject to the "Classpath" exception as provided
   9 # by Oracle in the LICENSE file that accompanied this code.
  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


  82    if [ $? = 0 ] ;
  83        then fail "test failed for "${URL}": syntax errors or inaccessible files"
  84    fi
  85 
  86    if [ $started = "0" ];
  87        then echo "the test passed for "${URL}
  88        else fail "test failed for "${URL}": the appletviewer behaviour is unexpected: "$started", see err file"
  89    fi
  90  }
  91 
  92 # end of subroutines
  93 
  94 
  95 # The beginning of the script proper
  96 
  97 # Checking for proper OS
  98 OS=`uname -s`
  99 case "$OS" in
 100    SunOS )
 101       VAR="One value for Sun"
 102       DEFAULT_JDK=/
 103       FILESEP="/"
 104       PATHSEP=":"
 105       TMP="/tmp"
 106       ;;
 107 
 108    Linux )
 109       VAR="A different value for Linux"
 110       DEFAULT_JDK=/
 111       FILESEP="/"
 112       PATHSEP=":"
 113       TMP="/tmp"
 114       ;;
 115 
 116    Darwin )
 117       VAR="A different value for MacOSX"
 118       DEFAULT_JDK=/usr
 119       FILESEP="/"
 120       PATHSEP=":"
 121       TMP="/tmp"
 122       ;;
 123 
 124    Windows* )
 125       VAR="A different value for Win32"
 126       DEFAULT_JDK="C:/Program Files/Java/jdk1.8.0"
 127       FILESEP="\\"
 128       PATHSEP=";"
 129       TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
 130       ;;
 131 
 132     CYGWIN* )
 133       VAR="A different value for Cygwin"
 134       DEFAULT_JDK="/cygdrive/c/Program\ Files/Java/jdk1.8.0"
 135       FILESEP="/"
 136       PATHSEP=";"
 137       TMP=`cd "${SystemRoot}/Temp"; echo ${PWD}`
 138       ;;
 139 
 140    # catch all other OSs
 141    * )
 142       echo "Unrecognized system!  $OS"
 143       fail "Unrecognized system!  $OS"
 144       ;;
 145 esac
 146 
 147 # 6438730: Only a minimal set of env variables are set for shell tests.
 148 # To guarantee that env variable holds correct value we need to set it ourselves.
 149 if [ -z "${PWD}" ] ; then
 150     PWD=`pwd`
 151 fi
 152 
 153 # check that some executable or other file you need is available, abort if not
 154 #  note that the name of the executable is in the fail string as well.
 155 # this is how to check for presence of the compiler, etc.
 156 #RESOURCE=`whence SomeProgramOrFileNeeded`
 157 #if [ "${RESOURCE}" = "" ] ;
 158 #   then fail "Need SomeProgramOrFileNeeded to perform the test" ;
 159 #fi