< prev index next >

test/jdk/tools/jpackage/linux/base/MaintainerBase.java

Print this page

        

*** 51,63 **** File outfile = new File(infoResult); if (!outfile.exists()) { throw new AssertionError(infoResult + " was not created"); } ! String output = Files.readString(outfile.toPath()); ! if (!output.contains("Maintainer: " + EMAIL)) { ! throw new AssertionError("Unexpected result: " + output); } } private static void testCreateInstaller() throws Exception { JPackageHelper.executeCLI(true, CMD); --- 51,72 ---- File outfile = new File(infoResult); if (!outfile.exists()) { throw new AssertionError(infoResult + " was not created"); } ! boolean maintainerFound = false; ! for (String line: Files.readAllLines(outfile.toPath())) { ! if (line.matches("^[ ]*Maintainer:.*$")) { ! maintainerFound = true; ! if (!line.contains(EMAIL)) { ! throw new AssertionError("Unexpected result: " + line); ! } ! } ! } ! ! if (!maintainerFound) { ! throw new AssertionError("Maintainer field not found"); } } private static void testCreateInstaller() throws Exception { JPackageHelper.executeCLI(true, CMD);
< prev index next >