Skip to content

Commit

Permalink
expected result should be the 1st argument
Browse files Browse the repository at this point in the history
  • Loading branch information
wangweij committed Sep 19, 2024
1 parent 8311e89 commit 17fdd52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/lib-test/jdk/test/lib/util/JarUtilsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ public static void main(String[] args) throws Exception {
Files.writeString(Path.of("b2"), ""),
Files.writeString(Path.of("bx/x"), ""),
Files.writeString(Path.of("c"), ""));
Asserts.assertEquals(content("a.jar"), Set.of("a", "b1", "b2", "bx/x", "c"));
Asserts.assertEquals(Set.of("a", "b1", "b2", "bx/x", "c"), content("a.jar"));

JarUtils.deleteEntries(Path.of("a.jar"), "a");
Asserts.assertEquals(content("a.jar"), Set.of("b1", "b2", "bx/x", "c"));
Asserts.assertEquals(Set.of("b1", "b2", "bx/x", "c"), content("a.jar"));

// Note: b* covers everything starting with b, even bx/x
JarUtils.deleteEntries(Path.of("a.jar"), "b*");
Asserts.assertEquals(content("a.jar"), Set.of("c"));
Asserts.assertEquals(Set.of("c"), content("a.jar"));
}

static Set<String> content(String name) throws IOException {
Expand Down

0 comments on commit 17fdd52

Please sign in to comment.