@Test public void mergeTwoWithDifferentHash() throws Exception { File left = new File(".test-files/mergeTwo/merged-manifest-left.yml"); File right = new File(".test-files/mergeTwo/merged-manifest-right.yml"); File merged = new File(".test-files/mergeTwo/merged-manifest-merged.yml"); left.delete(); right.delete(); merged.delete(); merged.getParentFile().mkdirs(); Files.write("coordinate:\n" + " groupId: com.github.jomof\n" + " artifactId: sdl2\n" + " version: 2.0.5-rev26\n" + "interfaces:\n" + " headers:\n" + " file: headers.zip\n" + " sha256: e7e61f29f9480209f1cad71c4d4f7cec75d63e7a457bbe9da0ac26a64ad5751b-left\n" + " size: 338812\n" + " include: include", left, StandardCharsets.UTF_8); Files.write("coordinate:\n" + " groupId: com.github.jomof\n" + " artifactId: sdl2\n" + " version: 2.0.5-rev26\n" + "interfaces:\n" + " headers:\n" + " file: headers.zip\n" + " sha256: e7e61f29f9480209f1cad71c4d4f7cec75d63e7a457bbe9da0ac26a64ad5751-right\n" + " size: 338812\n" + " include: include", right, StandardCharsets.UTF_8); merged.getParentFile().mkdirs(); String text = main("merge", left.toString(), right.toString(), merged.toString()); System.out.printf(text); String mergedText = FileUtils.readAllText(merged); System.out.printf(mergedText); assertThat(mergedText).contains("-right"); }
public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } }
CDep { public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } } }
CDep { public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } } CDep(@NotNull PrintStream out, @NotNull PrintStream err, boolean ansi); }
CDep { public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } } CDep(@NotNull PrintStream out, @NotNull PrintStream err, boolean ansi); static void main(@NotNull String[] args); }
CDep { public static void main(@NotNull String[] args) { try { new CDep(AnsiConsole.out, AnsiConsole.err, true).go(args, false); } catch (Throwable e) { e.printStackTrace(); System.exit(Integer.MIN_VALUE); } finally { AnsiConsole.out.close(); AnsiConsole.err.close(); } } CDep(@NotNull PrintStream out, @NotNull PrintStream err, boolean ansi); static void main(@NotNull String[] args);  }