diff options
author | Seth Tisue <seth@tisue.net> | 2015-08-27 17:42:57 -0400 |
---|---|---|
committer | Seth Tisue <seth@tisue.net> | 2015-08-27 17:42:57 -0400 |
commit | 9fc52c8729a2c63342cbc42e350f3b1782ddb7cb (patch) | |
tree | dc1ea5e807912c60ee690cc741c54d321c548699 /test/files | |
parent | d6728ce984f80c43a41615e6aa590b5a3d483bee (diff) | |
parent | 0b121d1864a3db1b34e5102e8258984ad0e8fd53 (diff) | |
download | scala-9fc52c8729a2c63342cbc42e350f3b1782ddb7cb.tar.gz scala-9fc52c8729a2c63342cbc42e350f3b1782ddb7cb.tar.bz2 scala-9fc52c8729a2c63342cbc42e350f3b1782ddb7cb.zip |
Merge pull request #4710 from retronym/ticket/9450
SI-9450 Fix triple quoted strings in REPL :power mode
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/repl-power.check | 3 | ||||
-rw-r--r-- | test/files/run/repl-power.scala | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/test/files/run/repl-power.check b/test/files/run/repl-power.check index 2a7b7783d9..4e030bd9fa 100644 --- a/test/files/run/repl-power.check +++ b/test/files/run/repl-power.check @@ -25,4 +25,7 @@ m: $r.treedsl.global.Literal = 10 scala> typed(m).tpe // typed is in scope res2: $r.treedsl.global.Type = Int(10) +scala> """escaping is hard, m'kah""" +res3: String = escaping is hard, m'kah + scala> :quit diff --git a/test/files/run/repl-power.scala b/test/files/run/repl-power.scala index 4dfeb37885..5ecaad8723 100644 --- a/test/files/run/repl-power.scala +++ b/test/files/run/repl-power.scala @@ -1,7 +1,9 @@ import scala.tools.partest.ReplTest object Test extends ReplTest { - def code = """ + def tripleQuote(s: String) = "\"\"\"" + s + "\"\"\"" + + def code = s""" :power // guarding against "error: reference to global is ambiguous" global.emptyValDef // "it is imported twice in the same scope by ..." @@ -9,5 +11,6 @@ val tp = ArrayClass[scala.util.Random] // magic with tags tp.memberType(Array_apply) // evidence val m = LIT(10) // treedsl typed(m).tpe // typed is in scope +${tripleQuote("escaping is hard, m'kah")} """.trim } |