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:
parent
267856d100
commit
3d3780d2e8
@ -38,9 +38,6 @@ jdk/javadoc/doclet/testIOException/TestIOException.java
|
|||||||
|
|
||||||
jdk/jshell/UserJdiUserRemoteTest.java 8173079 linux-all
|
jdk/jshell/UserJdiUserRemoteTest.java 8173079 linux-all
|
||||||
jdk/jshell/UserInputTest.java 8169536 generic-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
|
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
#
|
#
|
||||||
|
@ -49,22 +49,22 @@ public abstract class EditorTestBase extends ReplToolTesting {
|
|||||||
test(defaultStartup, args, tests);
|
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);
|
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);
|
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);
|
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);
|
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);
|
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() {
|
public void testStatementMush() {
|
||||||
testEditor(
|
testEditor(
|
||||||
a -> assertCommand(a, "System.out.println(\"Hello\")",
|
a -> assertCommand(a, "System.out.println(\"Hello\")",
|
||||||
|
@ -171,7 +171,7 @@ public class ExternalEditorTest extends EditorTestBase {
|
|||||||
|
|
||||||
private Future<?> task;
|
private Future<?> task;
|
||||||
@Override
|
@Override
|
||||||
public void assertEdit(boolean after, String cmd,
|
void assertEdit(boolean after, String cmd,
|
||||||
Consumer<String> checkInput, Consumer<String> checkOutput, Action action) {
|
Consumer<String> checkInput, Consumer<String> checkOutput, Action action) {
|
||||||
if (!after) {
|
if (!after) {
|
||||||
setCommandInput(cmd + "\n");
|
setCommandInput(cmd + "\n");
|
||||||
|
@ -138,7 +138,7 @@ public class StartOptionTest {
|
|||||||
private Consumer<String> assertOrNull(String expected, String label) {
|
private Consumer<String> assertOrNull(String expected, String label) {
|
||||||
return expected == null
|
return expected == null
|
||||||
? 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),
|
// Start and check the resultant: exit code (Ex), command output (Co),
|
||||||
|
Loading…
Reference in New Issue
Block a user