summaryrefslogtreecommitdiff
path: root/test/files/run
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-10-11 14:53:21 +0000
committerMartin Odersky <odersky@gmail.com>2011-10-11 14:53:21 +0000
commit0ef5e8a64556974f52b5aa2a121687862429d1fd (patch)
treec5dc6316e38a4df6381c71e6ec50a8336469babe /test/files/run
parent063f2c4984fc5047fd2909d7274cb9c62666c486 (diff)
downloadscala-0ef5e8a64556974f52b5aa2a121687862429d1fd.tar.gz
scala-0ef5e8a64556974f52b5aa2a121687862429d1fd.tar.bz2
scala-0ef5e8a64556974f52b5aa2a121687862429d1fd.zip
Simple test case for string interpolation.
Diffstat (limited to 'test/files/run')
-rw-r--r--test/files/run/stringInterpolation.flags1
-rw-r--r--test/files/run/stringInterpolation.scala9
2 files changed, 10 insertions, 0 deletions
diff --git a/test/files/run/stringInterpolation.flags b/test/files/run/stringInterpolation.flags
new file mode 100644
index 0000000000..48fd867160
--- /dev/null
+++ b/test/files/run/stringInterpolation.flags
@@ -0,0 +1 @@
+-Xexperimental
diff --git a/test/files/run/stringInterpolation.scala b/test/files/run/stringInterpolation.scala
new file mode 100644
index 0000000000..9c6c5963ae
--- /dev/null
+++ b/test/files/run/stringInterpolation.scala
@@ -0,0 +1,9 @@
+package test
+
+object stringInterpolation {
+ def main(args : Array[String]) : Unit = {
+ println("\{1} plus \{1} is \{1 + 1}")
+ val x = 1.1
+ println("We have a \{ x ;2.2f}% chance of success")
+ }
+}