diff options
author | Som Snytt <som.snytt@gmail.com> | 2015-07-20 17:07:51 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2015-09-02 12:45:29 +1000 |
commit | 1566196669bb74891a2116236b3e76ea340f6c29 (patch) | |
tree | fc857418f1ea580022dae0d833afb89a1bfa9002 /test/files | |
parent | 5a23aac8c421fa017edb094563c552236be13c6f (diff) | |
download | scala-1566196669bb74891a2116236b3e76ea340f6c29.tar.gz scala-1566196669bb74891a2116236b3e76ea340f6c29.tar.bz2 scala-1566196669bb74891a2116236b3e76ea340f6c29.zip |
SI-5408 Prompt after incomplete script paste
Transcript paste mode invites the user to keep typing like
regular paste mode, but really you must enter more transcript.
This matters if the script ends in the middle of incomplete
code that the user wants to complete by hand.
Previously,
```
scala> scala> def f() = {
// Detected repl transcript paste: ctrl-D to finish.
// Replaying 1 commands from transcript.
scala> def f() = {
scala> scala> def f() = {
// Detected repl transcript paste: ctrl-D to finish.
| }
// Replaying 1 commands from transcript.
scala> def f() = {
}
f: ()Unit
```
Now,
```
scala> scala> def f() = {
// Detected repl transcript. Paste more, or ctrl-D to finish.
// Replaying 1 commands from transcript.
scala> def f() = {
| 42
| }
f: ()Int
scala> f()
res0: Int = 42
```
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/repl-paste-2.check | 2 | ||||
-rw-r--r-- | test/files/run/repl-transcript.check | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/repl-paste-2.check b/test/files/run/repl-paste-2.check index dbf5363c0f..4c589df41a 100644 --- a/test/files/run/repl-paste-2.check +++ b/test/files/run/repl-paste-2.check @@ -1,7 +1,7 @@ scala> scala> 999l -// Detected repl transcript paste: ctrl-D to finish. +// Detected repl transcript. Paste more, or ctrl-D to finish. res4: Int = 0123 diff --git a/test/files/run/repl-transcript.check b/test/files/run/repl-transcript.check index 762a96b9cc..d0b455cbf6 100644 --- a/test/files/run/repl-transcript.check +++ b/test/files/run/repl-transcript.check @@ -1,7 +1,7 @@ scala> scala> class Bippity -// Detected repl transcript paste: ctrl-D to finish. +// Detected repl transcript. Paste more, or ctrl-D to finish. defined class Bippity |