From e96dba0c9a2467c6cf396c70a48ef0750503c26e Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 15 Mar 2011 02:56:58 +0000 Subject: Various chronic annoyances with the repl addres... Various chronic annoyances with the repl addressed. Much improved transcript pasting. Now goes back in time to fix the transcript if it contains self-referential "res0, res1" etc. so that it works as it originally did. Shows which commands it is running, and places the commands with their result in a manner suitable for framing. Also, a new :paste command which accepts input up to ctrl-D, so you can enter companions without gyrations, or code from people who write in a repl unfriendly fashion by putting their curly braces on the next line (I'm looking at you mark harrah) or you name it, it's not picky. No review. --- test/files/run/repl-paste-2.check | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 test/files/run/repl-paste-2.check (limited to 'test/files/run/repl-paste-2.check') diff --git a/test/files/run/repl-paste-2.check b/test/files/run/repl-paste-2.check new file mode 100644 index 0000000000..fb7a818f1a --- /dev/null +++ b/test/files/run/repl-paste-2.check @@ -0,0 +1,31 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> +scala> // Replaying 7 commands from transcript. + +val res0 = { 123 } +res0: Int = 123 + +val res1 = { 567 } +res1: Int = 567 + +val res2 = { res0 + res1 } +res2: Int = 690 + +val x = dingus +:7: error: not found: value dingus + val x = dingus + ^ + +val x = "dingus" +x: java.lang.String = dingus + +val res3 = { x.length } +res3: Int = 6 + +val res4 = { x.length + res3 } +res4: Int = 12 + + +scala> -- cgit v1.2.3