8232856: jshell crashes when pressing up arrow after /!
Reviewed-by: psandoz
This commit is contained in:
parent
700447f7e4
commit
cdef186c11
@ -833,6 +833,7 @@ class ConsoleIOContext extends IOContext {
|
||||
}
|
||||
it.remove();
|
||||
in.getHistory().add(source);
|
||||
in.getHistory().resetIndex();
|
||||
}
|
||||
|
||||
private static final long ESCAPE_TIMEOUT = 100;
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8178077
|
||||
* @bug 8178077 8232856
|
||||
* @summary Check the UI behavior of editing history.
|
||||
* @modules
|
||||
* jdk.compiler/com.sun.tools.javac.api
|
||||
@ -77,4 +77,16 @@ public class HistoryUITest extends UITesting {
|
||||
});
|
||||
}
|
||||
|
||||
public void testReRun() throws Exception {
|
||||
doRunTest((inputSink, out) -> {
|
||||
inputSink.write("System.err.println(\"RAN\");\n");
|
||||
waitOutput(out, "RAN.*" + PROMPT);
|
||||
inputSink.write("/!\n");
|
||||
waitOutput(out, "RAN.*" + PROMPT);
|
||||
inputSink.write(UP);
|
||||
inputSink.write("\n");
|
||||
waitOutput(out, "RAN.*" + PROMPT);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user