test/jdk/tools/jpackage/JPackageMissingArgumentsTest.java
branchJDK-8200758-branch
changeset 57241 e11f3bf34083
parent 57150 fa68c2ab636d
child 57307 4948a1944cf9
equal deleted inserted replaced
57220:6a80fd1912ef 57241:e11f3bf34083
    37         "create-image",
    37         "create-image",
    38         "--input", "input",
    38         "--input", "input",
    39         "--name", "test",
    39         "--name", "test",
    40         "--main-jar", "hello.jar",
    40         "--main-jar", "hello.jar",
    41         "--main-class", "Hello",
    41         "--main-class", "Hello",
    42         "--overwrite",
       
    43         "--files", "hello.jar"};
    42         "--files", "hello.jar"};
    44 
    43 
    45     private static final String [] RESULT_2 = {"--input"};
    44     private static final String [] RESULT_2 = {"--input"};
    46     private static final String [] CMD_2 = {
    45     private static final String [] CMD_2 = {
    47         "create-image",
    46         "create-image",
    48         "--output", "output",
    47         "--output", "output",
    49         "--name", "test",
    48         "--name", "test",
    50         "--main-jar", "hello.jar",
    49         "--main-jar", "hello.jar",
    51         "--main-class", "Hello",
    50         "--main-class", "Hello",
    52         "--overwrite",
       
    53         "--files", "hello.jar"};
    51         "--files", "hello.jar"};
    54 
    52 
    55     private static final String [] RESULT_3 = {"--input", "--app-image"};
    53     private static final String [] RESULT_3 = {"--input", "--app-image"};
    56     private static final String [] CMD_3 = {
    54     private static final String [] CMD_3 = {
    57         "create-installer",
    55         "create-installer",
    58         "--output", "output",
    56         "--output", "output",
    59         "--name", "test",
    57         "--name", "test",
    60         "--main-jar", "hello.jar",
    58         "--main-jar", "hello.jar",
    61         "--main-class", "Hello",
    59         "--main-class", "Hello",
    62         "--overwrite",
       
    63         "--files", "hello.jar"};
    60         "--files", "hello.jar"};
    64 
    61 
    65     private static final String [] RESULT_4 = {"--main-class"};
    62     private static final String [] RESULT_4 = {"--main-class"};
    66     private static final String [] CMD_4 = {
    63     private static final String [] CMD_4 = {
    67         "create-image",
    64         "create-image",
    68         "--input", "input",
    65         "--input", "input",
    69         "--output", "output",
    66         "--output", "output",
    70         "--name", "test",
    67         "--name", "test",
    71         "--main-jar", "hello.jar",
    68         "--main-jar", "hello.jar",
    72         "--overwrite",
       
    73         "--files", "hello.jar"};
    69         "--files", "hello.jar"};
    74 
    70 
    75     private static final String [] RESULT_5 = {"--main-jar"};
    71     private static final String [] RESULT_5 = {"--main-jar"};
    76     private static final String [] CMD_5 = {
    72     private static final String [] CMD_5 = {
    77         "create-image",
    73         "create-image",
    78         "--input", "input",
    74         "--input", "input",
    79         "--output", "output",
    75         "--output", "output",
    80         "--name", "test",
    76         "--name", "test",
    81         "--main-class", "Hello",
    77         "--main-class", "Hello",
    82         "--overwrite",
       
    83         "--files", "hello.jar"};
    78         "--files", "hello.jar"};
    84 
    79 
    85     private static final String [] RESULT_6 = {"--module-path", "--runtime-image"};
    80     private static final String [] RESULT_6 = {"--module-path", "--runtime-image"};
    86     private static final String [] CMD_6 = {
    81     private static final String [] CMD_6 = {
    87         "create-image",
    82         "create-image",
    88         "--output", "output",
    83         "--output", "output",
    89         "--name", "test",
    84         "--name", "test",
    90         "--module", "com.hello/com.hello.Hello",
    85         "--module", "com.hello/com.hello.Hello",
    91         "--overwrite",
       
    92         "--files", "hello.jar"};
    86         "--files", "hello.jar"};
    93 
    87 
    94     private static final String [] RESULT_7 = {"--module-path", "--runtime-image",
    88     private static final String [] RESULT_7 = {"--module-path", "--runtime-image",
    95                                                "--app-image"};
    89                                                "--app-image"};
    96     private static final String [] CMD_7 = {
    90     private static final String [] CMD_7 = {
    97         "create-installer",
    91         "create-installer",
    98         "--output", "output",
    92         "--output", "output",
    99         "--name", "test",
    93         "--name", "test",
   100         "--module", "com.hello/com.hello.Hello",
    94         "--module", "com.hello/com.hello.Hello",
   101         "--overwrite",
       
   102         "--files", "hello.jar"};
    95         "--files", "hello.jar"};
   103 
    96 
   104     private static void validate(String output, String [] expected)
    97     private static void validate(String output, String [] expected)
   105            throws Exception {
    98            throws Exception {
   106         String[] result = output.split("\n");
    99         String[] result = output.split("\n");