Skip to content

Commit

Permalink
Fixed version parsing in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Aug 3, 2024
1 parent 7a946b1 commit d029bb9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/test/java/rife/bld/operations/TestJlinkOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void testFileOptions() {
"src/test/resources/jlink/options_version.txt");
assertDoesNotThrow(jlink::execute);
var out = outputStreamCaptor.toString();
assertTrue(out.matches("\\d+.\\d+.\\d+[\\r\\n]+"), out);
assertTrue(out.matches("[\\d.]+[\\r\\n]+"), out);
}

@Test
Expand Down Expand Up @@ -147,6 +147,6 @@ void testVersion() {
var jlink = new JlinkOperation().toolArgs("--verbose", "--version");
assertDoesNotThrow(jlink::execute);
var out = outputStreamCaptor.toString();
assertTrue(out.matches("\\d+.\\d+.\\d+[\\r\\n]+"), out);
assertTrue(out.matches("[\\d.]+[\\r\\n]+"), out);
}
}
4 changes: 2 additions & 2 deletions src/test/java/rife/bld/operations/TestJmodOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void testFileOptions() {
var jmod = new JmodOperation().fileOptions("src/test/resources/jlink/options_version.txt");
assertDoesNotThrow(jmod::execute);
var out = outputStreamCaptor.toString();
assertTrue(out.matches("\\d+.\\d+.\\d+[\\r\\n]+"), out);
assertTrue(out.matches("[\\d.]+[\\r\\n]+"), out);
}

@Test
Expand All @@ -162,6 +162,6 @@ void testVersion() {
var jmod = new JmodOperation().toolArgs("--version");
assertDoesNotThrow(jmod::execute);
var out = outputStreamCaptor.toString();
assertTrue(out.matches("\\d+.\\d+.\\d+[\\r\\n]+"), out);
assertTrue(out.matches("[\\d.]+[\\r\\n]+"), out);
}
}
4 changes: 2 additions & 2 deletions src/test/java/rife/bld/operations/TestJpackageOperation.java
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void testFileOptions() {
"src/test/resources/jlink/options_version.txt");
assertDoesNotThrow(jpackage::execute);
var out = outputStreamCaptor.toString();
assertTrue(out.matches("\\d+.\\d+.\\d+[\\r\\n]+"), out);
assertTrue(out.matches("[\\d.]+[\\r\\n]+"), out);
}

@Test
Expand All @@ -224,6 +224,6 @@ void testVersion() {
var jpackage = new JpackageOperation().toolArgs("--verbose", "--version");
assertDoesNotThrow(jpackage::execute);
var out = outputStreamCaptor.toString();
assertTrue(out.matches("\\d+.\\d+.\\d+[\\r\\n]+"), out);
assertTrue(out.matches("[\\d.]+[\\r\\n]+"), out);
}
}

0 comments on commit d029bb9

Please sign in to comment.