Skip to content

Commit

Permalink
squash! Run StandaloneTests for Java 8 under Java 8
Browse files Browse the repository at this point in the history
Because option `-showversion` of Java 8 behaves slightly differently to
option `--show-version` of later versions of Java, prepare two new
files for expected stdout and stderr -- expected-out-java8.txt and
expected-err-java8.txt -- which are similar to existing files
expected-out.txt and expected-err.txt, but have different layout of
fastforward lines "JAVA VERSION" and "TREE".
  • Loading branch information
rybak committed Aug 6, 2023
1 parent 795e01d commit 140dfa3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
>> JAVA VERSION >>
.+ org.junit.platform.launcher.core.ServiceLoaderRegistry load
.+ Loaded LauncherInterceptor instances: ..
.+ org.junit.platform.launcher.core.ServiceLoaderRegistry load
.+ Loaded LauncherSessionListener instances: ..
.+ org.junit.platform.launcher.core.ServiceLoaderTestEngineRegistry loadTestEngines
.+ Discovered TestEngines:
- junit-jupiter .+
- junit-vintage .+
- junit-platform-suite .+
.+ org.junit.platform.launcher.core.ServiceLoaderRegistry load
.+ Loaded PostDiscoveryFilter instances: ..
.+ org.junit.platform.launcher.core.ServiceLoaderRegistry load
.+ Loaded LauncherDiscoveryListener instances: ..
.+ org.junit.platform.launcher.core.ServiceLoaderRegistry load
.+ Loaded TestExecutionListener instances: .+
.+ org.junit.platform.launcher.core.ServiceLoaderTestEngineRegistry loadTestEngines
.+ Discovered TestEngines:
- junit-jupiter .+
- junit-vintage .+
- junit-platform-suite .+
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
>> TREE >>
Failures (2):
>> STACKTRACE >>

Test run finished after \d+ ms
[ 11 containers found ]
[ 0 containers skipped ]
[ 11 containers started ]
[ 0 containers aborted ]
[ 11 containers successful ]
[ 0 containers failed ]
[ 10 tests found ]
[ 2 tests skipped ]
[ 8 tests started ]
[ 1 tests aborted ]
[ 5 tests successful ]
[ 2 tests failed ]

Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ void executeOnJava8() throws IOException {
assertEquals(1, result.getExitCode(), () -> getExitCodeMessage(result));

var workspace = Request.WORKSPACE.resolve("standalone");
var expectedOutLines = Files.readAllLines(workspace.resolve("expected-out.txt"));
var expectedErrLines = Files.readAllLines(workspace.resolve("expected-err.txt"));
var expectedOutLines = Files.readAllLines(workspace.resolve("expected-out-java8.txt"));
var expectedErrLines = Files.readAllLines(workspace.resolve("expected-err-java8.txt"));
assertLinesMatch(expectedOutLines, result.getOutputLines("out"));
assertLinesMatch(expectedErrLines, result.getOutputLines("err"));

Expand Down Expand Up @@ -427,8 +427,8 @@ void executeOnJava8SelectPackage() throws IOException {
assertEquals(1, result.getExitCode(), () -> getExitCodeMessage(result));

var workspace = Request.WORKSPACE.resolve("standalone");
var expectedOutLines = Files.readAllLines(workspace.resolve("expected-out.txt"));
var expectedErrLines = Files.readAllLines(workspace.resolve("expected-err.txt"));
var expectedOutLines = Files.readAllLines(workspace.resolve("expected-out-java8.txt"));
var expectedErrLines = Files.readAllLines(workspace.resolve("expected-err-java8.txt"));
assertLinesMatch(expectedOutLines, result.getOutputLines("out"));
assertLinesMatch(expectedErrLines, result.getOutputLines("err"));

Expand Down

0 comments on commit 140dfa3

Please sign in to comment.