40 /* |
40 /* |
41 * @test |
41 * @test |
42 * @summary jpackage basic testing |
42 * @summary jpackage basic testing |
43 * @library ../../../../helpers |
43 * @library ../../../../helpers |
44 * @build jdk.jpackage.test.* |
44 * @build jdk.jpackage.test.* |
45 * @modules jdk.jpackage/jdk.jpackage.internal |
45 * @modules jdk.incubator.jpackage/jdk.incubator.jpackage.internal |
46 * @compile BasicTest.java |
46 * @compile BasicTest.java |
47 * @run main/othervm/timeout=720 -Xmx512m jdk.jpackage.test.Main |
47 * @run main/othervm/timeout=720 -Xmx512m jdk.jpackage.test.Main |
48 * --jpt-run=jdk.jpackage.tests.BasicTest |
48 * --jpt-run=jdk.jpackage.tests.BasicTest |
49 */ |
49 */ |
50 |
50 |
51 public final class BasicTest { |
51 public final class BasicTest { |
52 @Test |
52 @Test |
53 public void testNoArgs() { |
53 public void testNoArgs() { |
54 List<String> output = JPackageCommand.filterOutput( |
54 List<String> output = |
55 getJPackageToolProvider().executeAndGetOutput()); |
55 getJPackageToolProvider().executeAndGetOutput(); |
56 TKit.assertStringListEquals(List.of("Usage: jpackage <mode> <options>", |
56 TKit.assertStringListEquals(List.of("Usage: jpackage <mode> <options>", |
57 "Use jpackage --help (or -h) for a list of possible options"), |
57 "Use jpackage --help (or -h) for a list of possible options"), |
58 output, "Check jpackage output"); |
58 output, "Check jpackage output"); |
59 } |
59 } |
60 |
60 |
61 @Test |
61 @Test |
62 public void testVersion() { |
62 public void testVersion() { |
63 List<String> output = JPackageCommand.filterOutput( |
63 List<String> output = |
64 getJPackageToolProvider() |
64 getJPackageToolProvider() |
65 .addArgument("--version") |
65 .addArgument("--version") |
66 .executeAndGetOutput()); |
66 .executeAndGetOutput(); |
67 TKit.assertStringListEquals(List.of(System.getProperty("java.version")), |
67 TKit.assertStringListEquals(List.of(System.getProperty("java.version")), |
68 output, "Check jpackage output"); |
68 output, "Check jpackage output"); |
69 } |
69 } |
70 |
70 |
71 @Test |
71 @Test |