From 8d175b907d41323333a5613e419303f10beddc76 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sat, 8 Feb 2014 15:43:08 +0100 Subject: SI-8253 Fix incorrect parsing of The spliced application was placed in the `attrMap` in `SymbolicXMLBuilder` and later incorrectly matched by a pattern intended only to match: xml.Text(s) That attribute value is generated by parsing: So the net effect was that the two fragments of XML were identical! This commit sharpens up the match to really look for a syntactic `_root_.scala.xml.Text("...")`. The test just prints the parse trees of a variety of cases, as we we should not test the modularized XML library in scala/scala. --- test/files/run/t8253.check | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 test/files/run/t8253.check (limited to 'test/files/run/t8253.check') diff --git a/test/files/run/t8253.check b/test/files/run/t8253.check new file mode 100644 index 0000000000..0b4cb2d1f7 --- /dev/null +++ b/test/files/run/t8253.check @@ -0,0 +1,40 @@ + + +{ + var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope; + $tmpscope = new _root_.scala.xml.NamespaceBinding(null, "ns1", $tmpscope); + { + val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope; + new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true) + } +} + + +{ + var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope; + $tmpscope = new _root_.scala.xml.NamespaceBinding(null, ns1, $tmpscope); + { + val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope; + new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true) + } +} + + +{ + var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope; + $tmpscope = new _root_.scala.xml.NamespaceBinding("foo", "ns1", $tmpscope); + { + val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope; + new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true) + } +} + + +{ + var $tmpscope: _root_.scala.xml.NamespaceBinding = $scope; + $tmpscope = new _root_.scala.xml.NamespaceBinding("foo", ns1, $tmpscope); + { + val $scope: _root_.scala.xml.NamespaceBinding = $tmpscope; + new _root_.scala.xml.Elem(null, "sample", _root_.scala.xml.Null, $scope, true) + } +} -- cgit v1.2.3