< prev index next >

test/jdk/tools/launcher/Arrrghs.java

Print this page
rev 54213 : 8218547: Simplify JLI_Open on Windows in native code (libjli)

*** 22,32 **** */ /** * @test * @bug 5030233 6214916 6356475 6571029 6684582 6742159 4459600 6758881 6753938 ! * 6894719 6968053 7151434 7146424 8007333 8077822 8143640 8132379 * @summary Argument parsing validation. * @modules jdk.compiler * jdk.zipfs * @compile -XDignore.symbol.file Arrrghs.java * @run main/othervm Arrrghs --- 22,32 ---- */ /** * @test * @bug 5030233 6214916 6356475 6571029 6684582 6742159 4459600 6758881 6753938 ! * 6894719 6968053 7151434 7146424 8007333 8077822 8143640 8132379 8218547 * @summary Argument parsing validation. * @modules jdk.compiler * jdk.zipfs * @compile -XDignore.symbol.file Arrrghs.java * @run main/othervm Arrrghs
*** 34,43 **** --- 34,46 ---- import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; + import java.nio.file.Files; + import java.nio.file.Paths; + import java.nio.file.Path; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map;
*** 488,497 **** --- 491,520 ---- if (!tr.testStatus) System.out.println(tr); } /* + * Tests -jar command on a jar file with "long" (> 260 chars) full path on Windows + */ + @Test + void testLongPathJarFile() throws IOException { + if (!isWindows) { + return; + } + // put the jar file to a location with long path + Path plong = Paths.get("longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest"); + Path pcreated = Files.createDirectories(plong); + Path pelp = Paths.get("longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/longpathtest_longpathtest/elp.jar"); + File elp = pelp.toFile(); + createJar(elp, new File("Foo"), "public static void main(String[] args){ System.out.println(\"Hello from ELP\");}"); + System.out.println("execute " + elp.getAbsolutePath()); + TestResult tr = doExec(javaCmd, "-jar", elp.getAbsolutePath()); + tr.checkPositive(); + tr.contains("Hello from ELP"); + } + + /* * Tests various dispositions of the main method, these tests are limited * to English locales as they check for error messages that are localized. */ @Test void testMainMethod() throws FileNotFoundException {
< prev index next >