File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/jdk.jshell/share/classes/jdk/internal/jshell/tool
test/langtools/jdk/jshell Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -833,6 +833,7 @@ public void replaceLastHistoryEntry(String source) {
833
833
}
834
834
it .remove ();
835
835
in .getHistory ().add (source );
836
+ in .getHistory ().resetIndex ();
836
837
}
837
838
838
839
private static final long ESCAPE_TIMEOUT = 100 ;
Original file line number Diff line number Diff line change 23
23
24
24
/**
25
25
* @test
26
- * @bug 8178077
26
+ * @bug 8178077 8232856
27
27
* @summary Check the UI behavior of editing history.
28
28
* @modules
29
29
* jdk.compiler/com.sun.tools.javac.api
@@ -77,4 +77,16 @@ public void testPrevNextSnippet() throws Exception {
77
77
});
78
78
}
79
79
80
+ public void testReRun () throws Exception {
81
+ doRunTest ((inputSink , out ) -> {
82
+ inputSink .write ("System.err.println(\" RAN\" );\n " );
83
+ waitOutput (out , "RAN.*" + PROMPT );
84
+ inputSink .write ("/!\n " );
85
+ waitOutput (out , "RAN.*" + PROMPT );
86
+ inputSink .write (UP );
87
+ inputSink .write ("\n " );
88
+ waitOutput (out , "RAN.*" + PROMPT );
89
+ });
90
+ }
91
+
80
92
}
You can’t perform that action at this time.
0 commit comments