equal
deleted
inserted
replaced
51 File outfile = new File(infoResult); |
51 File outfile = new File(infoResult); |
52 if (!outfile.exists()) { |
52 if (!outfile.exists()) { |
53 throw new AssertionError(infoResult + " was not created"); |
53 throw new AssertionError(infoResult + " was not created"); |
54 } |
54 } |
55 |
55 |
56 String output = Files.readString(outfile.toPath()); |
56 boolean maintainerFound = false; |
57 if (!output.contains("Maintainer: " + EMAIL)) { |
57 for (String line: Files.readAllLines(outfile.toPath())) { |
58 throw new AssertionError("Unexpected result: " + output); |
58 if (line.matches("^[ ]*Maintainer:.*$")) { |
|
59 maintainerFound = true; |
|
60 if (!line.contains(EMAIL)) { |
|
61 throw new AssertionError("Unexpected result: " + line); |
|
62 } |
|
63 } |
|
64 } |
|
65 |
|
66 if (!maintainerFound) { |
|
67 throw new AssertionError("Maintainer field not found"); |
59 } |
68 } |
60 } |
69 } |
61 |
70 |
62 private static void testCreateInstaller() throws Exception { |
71 private static void testCreateInstaller() throws Exception { |
63 JPackageHelper.executeCLI(true, CMD); |
72 JPackageHelper.executeCLI(true, CMD); |