diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-07-15 07:25:44 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2014-07-15 07:25:44 +0200 |
commit | 64df8bc3cb78a32cccc929d60b226b68ad67d624 (patch) | |
tree | 05489c8f182bede4b930aa7df6b69c81e2ff1156 /test | |
parent | 854de2dc0b209888d487f958e54cd05526cfd3f1 (diff) | |
parent | 146bdd7073e1184af36d3378595297f3cb92bccf (diff) | |
download | scala-64df8bc3cb78a32cccc929d60b226b68ad67d624.tar.gz scala-64df8bc3cb78a32cccc929d60b226b68ad67d624.tar.bz2 scala-64df8bc3cb78a32cccc929d60b226b68ad67d624.zip |
Merge pull request #3878 from som-snytt/issue/8608
SI-8608 f interpolator emits constant strings
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/stringinterpolation_macro-run.check | 4 | ||||
-rw-r--r-- | test/files/run/stringinterpolation_macro-run.scala | 1 | ||||
-rw-r--r-- | test/files/run/t8608-no-format.scala | 15 |
3 files changed, 20 insertions, 0 deletions
diff --git a/test/files/run/stringinterpolation_macro-run.check b/test/files/run/stringinterpolation_macro-run.check index ead61e76ac..c7f46bac87 100644 --- a/test/files/run/stringinterpolation_macro-run.check +++ b/test/files/run/stringinterpolation_macro-run.check @@ -63,5 +63,9 @@ She is 4 feet tall. 05/26/12 05/26/12 % + mind +------ +matter + 7 7 9 7 9 9 diff --git a/test/files/run/stringinterpolation_macro-run.scala b/test/files/run/stringinterpolation_macro-run.scala index a6def98540..e18375d521 100644 --- a/test/files/run/stringinterpolation_macro-run.scala +++ b/test/files/run/stringinterpolation_macro-run.scala @@ -115,6 +115,7 @@ println(f"""${"1234"}%TD""") // literals and arg indexes println(f"%%") +println(f" mind%n------%nmatter%n") println(f"${7}%d %<d ${9}%d") println(f"${7}%d %2$$d ${9}%d") diff --git a/test/files/run/t8608-no-format.scala b/test/files/run/t8608-no-format.scala new file mode 100644 index 0000000000..71c369a7ea --- /dev/null +++ b/test/files/run/t8608-no-format.scala @@ -0,0 +1,15 @@ + +import scala.tools.partest.JavapTest + +object Test extends JavapTest { + def code = """ + |f"hello, world" + |:javap -prv - + """.stripMargin + + // no format + override def yah(res: Seq[String]) = { + // note: avoid the word "information" + res forall (!_.contains("StringOps.format")) + } +} |