UNCTest.sh revision 2362
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley#!/bin/sh
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley
ae871ebb28959bed920cc96cd9e91063b6625b78Mark Andrews#
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington# Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
ae871ebb28959bed920cc96cd9e91063b6625b78Mark Andrews# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington#
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# This code is free software; you can redistribute it and/or modify it
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# under the terms of the GNU General Public License version 2 only, as
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# published by the Free Software Foundation.
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley#
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# This code is distributed in the hope that it will be useful, but WITHOUT
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# version 2 for more details (a copy is included in the LICENSE file that
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# accompanied this code).
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley#
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# You should have received a copy of the GNU General Public License version
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# 2 along with this work; if not, write to the Free Software Foundation,
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley#
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# or visit www.oracle.com if you need additional information or have any
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# questions.
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews#
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews
ae871ebb28959bed920cc96cd9e91063b6625b78Mark Andrews# @test
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# @bug 4401485
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# @run shell UNCTest.sh
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews# @summary Check that URL.openConnection() doesn't open connection
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# to UNC.
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark Andrews
beb12aad6bebb0d6891613e65a4e19a42e6e3f8eMark AndrewsUNC="file://jdk/LOCAL-JAVA/jdk1.4/win/README.txt"
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian WellingtonOS=`uname -s`
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellingtoncase "$OS" in
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington Windows_95 | Windows_98 | Windows_NT )
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington ${TESTJAVA}/bin/javac -d . ${TESTSRC}\\UNCTest.java
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington ${TESTJAVA}/bin/java UNCTest ${UNC}
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington exit
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington ;;
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington * )
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington echo "This test is not intended for this OS - passing test"
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington exit 0
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington ;;
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellingtonesac
1812c92e63f4f84f1111cc2ef9cda53fd6009981Brian Wellington