553N/A# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 0N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A# This code is free software; you can redistribute it and/or modify it 0N/A# under the terms of the GNU General Public License version 2 only, as 0N/A# published by the Free Software Foundation. 0N/A# This code is distributed in the hope that it will be useful, but WITHOUT 0N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A# version 2 for more details (a copy is included in the LICENSE file that 0N/A# accompanied this code). 0N/A# You should have received a copy of the GNU General Public License version 0N/A# 2 along with this work; if not, write to the Free Software Foundation, 0N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A# @summary Test classpath wildcards for javac and java -classpath option. 0N/A#---------------------------------------------------------------- 0N/A#---------------------------------------------------------------- 0N/A# Note that, on Windows only, the launcher also includes another 0N/A# Therefore, on Windows, -classpath "foo/*" is treated differently 0N/A# from -classpath ".${PS}foo/*" 0N/A#---------------------------------------------------------------- 0N/A#---------------------------------------------------------------- 0N/A# Prepare the "Minefield" 0N/A#---------------------------------------------------------------- 0N/Aecho 'public class Lib {public static void f(){}}' >
Lib.java 0N/Aecho 'public class Lib2 {public static void g(){}}' >
Lib2.java 0N/Aecho 'public class Lib3 {public static void h(){}}' >
Lib3.java 0N/Aecho 'public class Spe1 {public static void f(){}}' >
Spe1.java 0N/Aecho 'public class Spe2 {public static void f(){}}' >
Spe2.java 0N/Aecho 'public class Spe3 {public static void f(){}}' >
Spe3.java 0N/Aecho 'public class Spe4 {public static void f(){}}' >
Spe4.java 0N/A#---------------------------------------------------------------- 0N/A# Verify expected behaviour with directory named "*" 0N/A#---------------------------------------------------------------- 0N/A printf "Running tests with directory named \"*\"\n" 0N/A#---------------------------------------------------------------- 0N/A# Verify the basic jar file works 0N/A#---------------------------------------------------------------- 0N/A#baseline test to verify it works. 0N/A#basic test of one jar to be loaded 0N/A#in a subdir. First * should not load jars in subdirectories unless specified 0N/A#Same with launcher. Should not load jar in subdirectories unless specified 0N/A#---------------------------------------------------------------- 0N/A# Verify the jar files in 2 directories 0N/A#---------------------------------------------------------------- 0N/A#---------------------------------------------------------------- 0N/A# Verify jar file and class file in same directory. 0N/A#---------------------------------------------------------------- 0N/A#---------------------------------------------------------------- 0N/A# Verify these odd jar files work explicitly on classpath, kind of 0N/A# a baseline. Last one is also a test with * in a jar name. 0N/A#---------------------------------------------------------------- 0N/A#---------------------------------------------------------------- 0N/A# Verify these odd jar files work with classpath wildcard. 0N/A#---------------------------------------------------------------- 0N/A printf "Running tests with jar file names containing special characters\n" 0N/A# Failure "$javac" ${TESTTOOLVMOPTS} -classpath "SpeJar/*" Main1.java 0N/A# Success "$java" ${TESTVMOPTS} -classpath "SpeJar/*" Main1 0N/A#---------------------------------------------------------------- 0N/A# Verify these jar files with asterisk in jar file name 0N/A#---------------------------------------------------------------- 0N/A printf "Running tests with jar file names containing \"*\"\n" 0N/A#---------------------------------------------------------------- 0N/A# Verify these jar files with varying extensions 0N/A#---------------------------------------------------------------- 0N/A# Mixed case extensions should not be loaded. 0N/A#upper case, .JAR, extension should be loaded 0N/A# zip extensions should not be loaded 0N/A#----------------------------------------------------------------