8191455: jdk/jshell/StartOptionTest.java and jdk/jshell/ToolProviderTest.java failed after changeset e0f08a
8191456: jdk/jshell/ExternalEditorTest.java testStatementMush() failure
Reviewed-by: jlahoda
--- a/test/langtools/ProblemList.txt Mon Dec 04 16:14:29 2017 -0800
+++ b/test/langtools/ProblemList.txt Mon Dec 04 17:15:38 2017 -0800
@@ -38,9 +38,6 @@
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
###########################################################################
#
--- a/test/langtools/jdk/jshell/EditorTestBase.java Mon Dec 04 16:14:29 2017 -0800
+++ b/test/langtools/jdk/jshell/EditorTestBase.java Mon Dec 04 17:15:38 2017 -0800
@@ -49,22 +49,22 @@
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 @@
);
}
- @Test
+ @Test(enabled = false) // TODO JDK-8191875
public void testStatementMush() {
testEditor(
a -> assertCommand(a, "System.out.println(\"Hello\")",
--- a/test/langtools/jdk/jshell/ExternalEditorTest.java Mon Dec 04 16:14:29 2017 -0800
+++ b/test/langtools/jdk/jshell/ExternalEditorTest.java Mon Dec 04 17:15:38 2017 -0800
@@ -171,7 +171,7 @@
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");
--- a/test/langtools/jdk/jshell/StartOptionTest.java Mon Dec 04 16:14:29 2017 -0800
+++ b/test/langtools/jdk/jshell/StartOptionTest.java Mon Dec 04 17:15:38 2017 -0800
@@ -138,7 +138,7 @@
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),