< prev index next >
jdk/test/tools/jmod/JmodNegativeTest.java
Print this page
*** 312,322 ****
String cp = EXPLODED_DIR.resolve("foo").resolve("classes").toString();
jmod("create",
"--class-path", cp,
"--hash-modules", ".*",
! "--modulepath", emptyDir.toString(),
jmod.toString())
.resultChecker(r ->
assertContains(r.output, "No hashes recorded: " +
"no module specified for hashing depends on foo")
);
--- 312,322 ----
String cp = EXPLODED_DIR.resolve("foo").resolve("classes").toString();
jmod("create",
"--class-path", cp,
"--hash-modules", ".*",
! "--module-path", emptyDir.toString(),
jmod.toString())
.resultChecker(r ->
assertContains(r.output, "No hashes recorded: " +
"no module specified for hashing depends on foo")
);
*** 333,343 ****
String cp = EXPLODED_DIR.resolve("foo").resolve("classes").toString();
jmod("create",
"--class-path", cp,
"--hash-modules", ".*",
! "--modulepath", MODS_DIR.toString(),
jmod.toString())
.assertFailure();
} finally {
FileUtils.deleteFileWithRetry(empty);
}
--- 333,343 ----
String cp = EXPLODED_DIR.resolve("foo").resolve("classes").toString();
jmod("create",
"--class-path", cp,
"--hash-modules", ".*",
! "--module-path", MODS_DIR.toString(),
jmod.toString())
.assertFailure();
} finally {
FileUtils.deleteFileWithRetry(empty);
}
*** 351,361 ****
FileUtils.deleteFileIfExistsWithRetry(file);
Files.createFile(file);
jmod("create",
"--hash-modules", ".*",
! "--modulepath", file.toString(),
jmod.toString())
.assertFailure()
.resultChecker(r ->
assertContains(r.output, "Error: path must be a directory")
);
--- 351,361 ----
FileUtils.deleteFileIfExistsWithRetry(file);
Files.createFile(file);
jmod("create",
"--hash-modules", ".*",
! "--module-path", file.toString(),
jmod.toString())
.assertFailure()
.resultChecker(r ->
assertContains(r.output, "Error: path must be a directory")
);
*** 368,378 ****
FileUtils.deleteFileIfExistsWithRetry(Paths.get("doesNotExist"));
List<Supplier<JmodResult>> tasks = Arrays.asList(
() -> jmod("create",
"--hash-modules", "anyPattern",
! "--modulepath", "doesNotExist",
"output.jmod"),
() -> jmod("create",
"--class-path", "doesNotExist",
"output.jmod"),
() -> jmod("create",
--- 368,378 ----
FileUtils.deleteFileIfExistsWithRetry(Paths.get("doesNotExist"));
List<Supplier<JmodResult>> tasks = Arrays.asList(
() -> jmod("create",
"--hash-modules", "anyPattern",
! "--module-path", "doesNotExist",
"output.jmod"),
() -> jmod("create",
"--class-path", "doesNotExist",
"output.jmod"),
() -> jmod("create",
*** 416,426 ****
Files.createDirectory(emptyDir);
List<Supplier<JmodResult>> tasks = Arrays.asList(
() -> jmod("create",
"--hash-modules", "anyPattern",
! "--modulepath","empty" + pathSeparator + "doesNotExist",
"output.jmod"),
() -> jmod("create",
"--class-path", "empty" + pathSeparator + "doesNotExist",
"output.jmod"),
() -> jmod("create",
--- 416,426 ----
Files.createDirectory(emptyDir);
List<Supplier<JmodResult>> tasks = Arrays.asList(
() -> jmod("create",
"--hash-modules", "anyPattern",
! "--module-path","empty" + pathSeparator + "doesNotExist",
"output.jmod"),
() -> jmod("create",
"--class-path", "empty" + pathSeparator + "doesNotExist",
"output.jmod"),
() -> jmod("create",
*** 465,475 ****
List<Supplier<JmodResult>> tasks = Arrays.asList(
() -> jmod("create",
"--class-path", "aFile.txt",
"output.jmod"),
() -> jmod("create",
! "--modulepath", "aFile.txt",
"output.jmod"),
() -> jmod("create",
"--cmds", "aFile.txt",
"output.jmod"),
() -> jmod("create",
--- 465,475 ----
List<Supplier<JmodResult>> tasks = Arrays.asList(
() -> jmod("create",
"--class-path", "aFile.txt",
"output.jmod"),
() -> jmod("create",
! "--module-path", "aFile.txt",
"output.jmod"),
() -> jmod("create",
"--cmds", "aFile.txt",
"output.jmod"),
() -> jmod("create",
< prev index next >