8191455: jdk/jshell/StartOptionTest.java and jdk/jshell/ToolProviderTest.java failed after changeset e0f08a

8191456: jdk/jshell/ExternalEditorTest.java testStatementMush() failure

Reviewed-by: jlahoda
This commit is contained in:
Robert Field 2017-12-04 17:15:38 -08:00
parent 267856d100
commit 3d3780d2e8
4 changed files with 8 additions and 11 deletions

View File

@ -38,9 +38,6 @@ jdk/javadoc/doclet/testIOException/TestIOException.java
jdk/jshell/UserJdiUserRemoteTest.java 8173079 linux-all
jdk/jshell/UserInputTest.java 8169536 generic-all
jdk/jshell/StartOptionTest.java 8191455 windows-all
jdk/jshell/ToolProviderTest.java 8191455 windows-all
jdk/jshell/ExternalEditorTest.java 8191456 generic-all
###########################################################################
#

View File

@ -49,22 +49,22 @@ public abstract class EditorTestBase extends ReplToolTesting {
test(defaultStartup, args, tests);
}
public abstract void assertEdit(boolean after, String cmd,
abstract void assertEdit(boolean after, String cmd,
Consumer<String> checkInput, Consumer<String> checkOutput, Action action);
public void assertEditInput(boolean after, String cmd, Consumer<String> checkInput, Action action) {
void assertEditInput(boolean after, String cmd, Consumer<String> checkInput, Action action) {
assertEdit(after, cmd, checkInput, s -> {}, action);
}
public void assertEditOutput(boolean after, String cmd, Consumer<String> checkOutput, Action action) {
void assertEditOutput(boolean after, String cmd, Consumer<String> checkOutput, Action action) {
assertEdit(after, cmd, s -> {}, checkOutput, action);
}
public void assertEditInput(boolean after, String cmd, String input, Action action) {
void assertEditInput(boolean after, String cmd, String input, Action action) {
assertEditInput(after, cmd, s -> assertEquals(s, input, "Input"), action);
}
public void assertEditOutput(boolean after, String cmd, String output, Action action) {
void assertEditOutput(boolean after, String cmd, String output, Action action) {
assertEditOutput(after, cmd, s -> assertEquals(s.trim(), output.trim(), "command"), action);
}
@ -245,7 +245,7 @@ public abstract class EditorTestBase extends ReplToolTesting {
);
}
@Test
@Test(enabled = false) // TODO JDK-8191875
public void testStatementMush() {
testEditor(
a -> assertCommand(a, "System.out.println(\"Hello\")",

View File

@ -171,7 +171,7 @@ public class ExternalEditorTest extends EditorTestBase {
private Future<?> task;
@Override
public void assertEdit(boolean after, String cmd,
void assertEdit(boolean after, String cmd,
Consumer<String> checkInput, Consumer<String> checkOutput, Action action) {
if (!after) {
setCommandInput(cmd + "\n");

View File

@ -138,7 +138,7 @@ public class StartOptionTest {
private Consumer<String> assertOrNull(String expected, String label) {
return expected == null
? null
: s -> assertEquals(s.trim(), expected.trim(), label);
: s -> assertEquals(s.replaceAll("\\r\\n?", "\n").trim(), expected.trim(), label);
}
// Start and check the resultant: exit code (Ex), command output (Co),