summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2014-12-04 16:55:50 +0100
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2014-12-04 16:55:50 +0100
commit3eddd4cc1736defe9743f31765df3d42b7f211d4 (patch)
tree73f49773be283cde7693a403784fb51b468435d1 /test
parent40547cd02aeb8bbd3682a281d8a1c5afcab782ee (diff)
parentdb8d5476537902760d33d29839afd813ff369ac8 (diff)
downloadscala-3eddd4cc1736defe9743f31765df3d42b7f211d4.tar.gz
scala-3eddd4cc1736defe9743f31765df3d42b7f211d4.tar.bz2
scala-3eddd4cc1736defe9743f31765df3d42b7f211d4.zip
Merge pull request #4185 from som-snytt/issue/9027
SI-9027 Parser no longer consumes space after multi XML elements
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t9027.check19
-rw-r--r--test/files/run/t9027.scala15
2 files changed, 34 insertions, 0 deletions
diff --git a/test/files/run/t9027.check b/test/files/run/t9027.check
new file mode 100644
index 0000000000..3429254286
--- /dev/null
+++ b/test/files/run/t9027.check
@@ -0,0 +1,19 @@
+{
+ {
+ val $buf = new _root_.scala.xml.NodeBuffer();
+ $buf.$amp$plus(new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null, $scope, true));
+ $buf.$amp$plus(new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true));
+ $buf
+ };
+ println("hello, world.")
+}
+{
+ {
+ val $buf = new _root_.scala.xml.NodeBuffer();
+ $buf.$amp$plus(new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null, $scope, true));
+ $buf.$amp$plus(new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true));
+ $buf.$amp$plus(new _root_.scala.xml.Elem(null, "c", _root_.scala.xml.Null, $scope, true));
+ $buf
+ };
+ println("hello, world.")
+}
diff --git a/test/files/run/t9027.scala b/test/files/run/t9027.scala
new file mode 100644
index 0000000000..26238147da
--- /dev/null
+++ b/test/files/run/t9027.scala
@@ -0,0 +1,15 @@
+
+// used to be parsed as .println
+object Test extends App {
+ import reflect.runtime._, universe._
+
+ val trees = List(
+ q"""<a/><b/>
+ println("hello, world.")""",
+ q"""<a/>
+ <b/>
+ <c/>
+ println("hello, world.")"""
+ )
+ trees foreach println
+}