33 import java.util.jar.JarEntry;
34 import java.util.jar.JarInputStream;
35 import java.util.jar.JarOutputStream;
36 import java.util.stream.Stream;
37
38 import jdk.test.lib.util.FileUtils;
39 import jdk.testlibrary.JDKToolFinder;
40 import org.testng.annotations.BeforeTest;
41 import org.testng.annotations.Test;
42
43 import static java.lang.String.format;
44 import static java.lang.System.out;
45 import static java.nio.charset.StandardCharsets.UTF_8;
46 import static org.testng.Assert.assertFalse;
47 import static org.testng.Assert.assertTrue;
48
49 /*
50 * @test
51 * @bug 8170952
52 * @library /lib/testlibrary /test/lib
53 * @build jdk.testlibrary.JDKToolFinder
54 * @run testng CLICompatibility
55 * @summary Basic test for compatibility of CLI options
56 */
57
58 public class CLICompatibility {
59 static final Path TEST_CLASSES = Paths.get(System.getProperty("test.classes", "."));
60 static final Path USER_DIR = Paths.get(System.getProperty("user.dir"));
61
62 static final String TOOL_VM_OPTIONS = System.getProperty("test.tool.vm.opts", "");
63
64 final boolean legacyOnly; // for running on older JDK's ( test validation )
65
66 // Resources we know to exist, that can be used for creating jar files.
67 static final String RES1 = "CLICompatibility.class";
68 static final String RES2 = "CLICompatibility$Result.class";
69
70 @BeforeTest
71 public void setupResourcesForJar() throws Exception {
72 // Copy the files that we are going to use for creating/updating test
73 // jar files, so that they can be referred to without '-C dir'
|
33 import java.util.jar.JarEntry;
34 import java.util.jar.JarInputStream;
35 import java.util.jar.JarOutputStream;
36 import java.util.stream.Stream;
37
38 import jdk.test.lib.util.FileUtils;
39 import jdk.testlibrary.JDKToolFinder;
40 import org.testng.annotations.BeforeTest;
41 import org.testng.annotations.Test;
42
43 import static java.lang.String.format;
44 import static java.lang.System.out;
45 import static java.nio.charset.StandardCharsets.UTF_8;
46 import static org.testng.Assert.assertFalse;
47 import static org.testng.Assert.assertTrue;
48
49 /*
50 * @test
51 * @bug 8170952
52 * @library /lib/testlibrary /test/lib
53 * @build jdk.test.lib.util.FileUtils
54 * jdk.test.lib.Utils
55 * jdk.test.lib.Asserts
56 * jdk.test.lib.JDKToolFinder
57 * jdk.test.lib.JDKToolLauncher
58 * jdk.test.lib.Platform
59 * jdk.test.lib.process.*
60 * jdk.testlibrary.JDKToolFinder
61 * @run testng CLICompatibility
62 * @summary Basic test for compatibility of CLI options
63 */
64
65 public class CLICompatibility {
66 static final Path TEST_CLASSES = Paths.get(System.getProperty("test.classes", "."));
67 static final Path USER_DIR = Paths.get(System.getProperty("user.dir"));
68
69 static final String TOOL_VM_OPTIONS = System.getProperty("test.tool.vm.opts", "");
70
71 final boolean legacyOnly; // for running on older JDK's ( test validation )
72
73 // Resources we know to exist, that can be used for creating jar files.
74 static final String RES1 = "CLICompatibility.class";
75 static final String RES2 = "CLICompatibility$Result.class";
76
77 @BeforeTest
78 public void setupResourcesForJar() throws Exception {
79 // Copy the files that we are going to use for creating/updating test
80 // jar files, so that they can be referred to without '-C dir'
|