29 /**
30 * Test --linux-deb-maintainer parameter. Output of the test should be
31 * maintainertest_1.0-1_amd64.deb package bundle. The output package
32 * should provide the same functionality as the
33 * default package.
34 * Value of Maintainer property of the package should contain
35 * jpackage-test@java.com email address.
36 */
37
38
39 /*
40 * @test
41 * @summary jpackage with --linux-deb-maintainer
42 * @library ../helpers
43 * @requires (os.family == "linux")
44 * @modules jdk.jpackage/jdk.jpackage.internal
45 * @run main/othervm/timeout=360 -Xmx512m MaintainerTest
46 */
47 public class MaintainerTest {
48
49 public static void main(String[] args) throws Exception {
50 final String MAINTAINER = "jpackage-test@java.com";
51
52 new PackageTest().forTypes(PackageType.LINUX_DEB).configureHelloApp()
53 .addInitializer(cmd -> {
54 cmd.addArguments("--linux-deb-maintainer", MAINTAINER);
55 })
56 .addBundlePropertyVerifier("Maintainer", (propName, propValue) -> {
57 String lookupValue = "<" + MAINTAINER + ">";
58 Test.assertTrue(propValue.endsWith(lookupValue),
59 String.format("Check value of %s property [%s] ends with %s",
60 propName, propValue, lookupValue));
61 })
62 .run();
63 }
64 }
|
29 /**
30 * Test --linux-deb-maintainer parameter. Output of the test should be
31 * maintainertest_1.0-1_amd64.deb package bundle. The output package
32 * should provide the same functionality as the
33 * default package.
34 * Value of Maintainer property of the package should contain
35 * jpackage-test@java.com email address.
36 */
37
38
39 /*
40 * @test
41 * @summary jpackage with --linux-deb-maintainer
42 * @library ../helpers
43 * @requires (os.family == "linux")
44 * @modules jdk.jpackage/jdk.jpackage.internal
45 * @run main/othervm/timeout=360 -Xmx512m MaintainerTest
46 */
47 public class MaintainerTest {
48
49 public static void main(String[] args) {
50 final String MAINTAINER = "jpackage-test@java.com";
51
52 Test.run(args, () -> {
53 new PackageTest().forTypes(PackageType.LINUX_DEB).configureHelloApp()
54 .addInitializer(cmd -> {
55 cmd.addArguments("--linux-deb-maintainer", MAINTAINER);
56 })
57 .addBundlePropertyVerifier("Maintainer", (propName, propValue) -> {
58 String lookupValue = "<" + MAINTAINER + ">";
59 Test.assertTrue(propValue.endsWith(lookupValue),
60 String.format("Check value of %s property [%s] ends with %s",
61 propName, propValue, lookupValue));
62 })
63 .run();
64 });
65 }
66 }
|