test/jdk/tools/jpackage/createappimage/JPackageCreateAppImageAddLauncherBase.java
branchJDK-8200758-branch
changeset 57445 405ddd80496e
parent 57395 521c02b9eed0
equal deleted inserted replaced
57444:91e9d4691e5e 57445:405ddd80496e
    30 import java.util.List;
    30 import java.util.List;
    31 
    31 
    32 public class JPackageCreateAppImageAddLauncherBase {
    32 public class JPackageCreateAppImageAddLauncherBase {
    33     private static final String app = JPackagePath.getApp();
    33     private static final String app = JPackagePath.getApp();
    34     private static final String appOutput = JPackagePath.getAppOutputFile();
    34     private static final String appOutput = JPackagePath.getAppOutputFile();
    35     private static final String appWorkingDir = JPackagePath.getAppWorkingDir();
       
    36 
    35 
    37     // Note: quotes in argument for add launcher is not support by test
    36     // Note: quotes in argument for add launcher is not support by test
    38     private static final String ARGUMENT1 = "argument 1";
    37     private static final String ARGUMENT1 = "argument 1";
    39     private static final String ARGUMENT2 = "argument 2";
    38     private static final String ARGUMENT2 = "argument 2";
    40     private static final String ARGUMENT3 = "argument 3";
    39     private static final String ARGUMENT3 = "argument 3";
    48     private static final List<String> vmArguments = new ArrayList<>();
    47     private static final List<String> vmArguments = new ArrayList<>();
    49     private static final List<String> empty = new ArrayList<>();
    48     private static final List<String> empty = new ArrayList<>();
    50 
    49 
    51     private static void validateResult(List<String> args, List<String> vmArgs)
    50     private static void validateResult(List<String> args, List<String> vmArgs)
    52             throws Exception {
    51             throws Exception {
    53         File outfile = new File(appWorkingDir + File.separator + appOutput);
    52         File outfile = new File(appOutput);
    54         if (!outfile.exists()) {
    53         if (!outfile.exists()) {
    55             throw new AssertionError(appOutput + " was not created");
    54             throw new AssertionError(appOutput + " was not created");
    56         }
    55         }
    57 
    56 
    58         String output = Files.readString(outfile.toPath());
    57         String output = Files.readString(outfile.toPath());