@Test public void checkThatHashesWork() throws Exception { File yaml = new File(".test-files/checkThatHashesWork/cdep.yml"); yaml.getParentFile().mkdirs(); Files.write("builders: [cmake, cmakeExamples]\ndependencies:\n- compile: com.github" + ".jomof:low-level-statistics:0.0.16\n", yaml, StandardCharsets.UTF_8); File hashes = new File(".test-files/checkThatHashesWork/cdep.sha256"); Files.write("- coordinate: com.github.jomof:low-level-statistics:0.0.16\n " + "sha256: dogbone", hashes, StandardCharsets.UTF_8); try { main("-wf", yaml.getParent()); fail("Expected failure"); } catch (RuntimeException e) { assertThat(e).hasMessage("SHA256 of cdep-manifest.yml for package 'com.github.jomof:low-level-statistics:0.0.16' " + "does not agree with constant in cdep.sha256. Something changed."); } }
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);  }