diff options
author | Som Snytt <som.snytt@gmail.com> | 2017-01-16 22:21:14 -0800 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2017-01-18 10:22:59 -0800 |
commit | 05cc3e2271d2c2226ded33bef5a03f0c70c6f66d (patch) | |
tree | 5d90b2250798d66e884f5b21416873c5872c5536 /test/junit/scala | |
parent | 939abf1c7062f8be4f84854bb44a8e146d14a07f (diff) | |
download | scala-05cc3e2271d2c2226ded33bef5a03f0c70c6f66d.tar.gz scala-05cc3e2271d2c2226ded33bef5a03f0c70c6f66d.tar.bz2 scala-05cc3e2271d2c2226ded33bef5a03f0c70c6f66d.zip |
SI-10120 ReplReporter handles message indent
Instead of indenting source code to make messages
align on output, let the reporter add indentation,
only if the source is the console (and not a pastie
or a loaded file).
Previously, syntax errors were not indented.
```
$ skala
Welcome to Scala 2.12.2-20170108-010722-939abf1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.
scala> 'abc'
<console>:1: error: unclosed character literal (or use " for string literal "abc")
'abc'
^
scala> :quit
$ scala
Welcome to Scala 2.12.1 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_111).
Type in expressions for evaluation. Or try :help.
scala> 'abc'
<console>:1: error: unclosed character literal
'abc'
^
```
Diffstat (limited to 'test/junit/scala')
-rw-r--r-- | test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala b/test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala index 01d17110d6..e9f1336623 100644 --- a/test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala +++ b/test/junit/scala/tools/nsc/interpreter/ScriptedTest.scala @@ -96,7 +96,7 @@ class ScriptedTest { } @Test def `on compile error`(): Unit = { val engine = scripted - val err = "not found: value foo in def f = foo at line number 11 at column number 16" + val err = "not found: value foo in def f = foo at line number 11 at column number 9" assertThrows[ScriptException](engine.compile("def f = foo"), _ == err) } } |