summaryrefslogtreecommitdiff
path: root/test/files/run/t8253.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-02-08 15:43:08 +0100
committerJason Zaugg <jzaugg@gmail.com>2014-11-10 10:18:03 +1000
commit8d175b907d41323333a5613e419303f10beddc76 (patch)
tree3dff29c42d7ac22b0ef7a2cb7517bec99a94ee7c /test/files/run/t8253.check
parentb431a4bd83d3bfb2b95d0426d2905b34ce1265ad (diff)
downloadscala-8d175b907d41323333a5613e419303f10beddc76.tar.gz
scala-8d175b907d41323333a5613e419303f10beddc76.tar.bz2
scala-8d175b907d41323333a5613e419303f10beddc76.zip
SI-8253 Fix incorrect parsing of <elem xmlns={f("a")}/>
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: <elem xmlns='a'/> 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.
Diffstat (limited to 'test/files/run/t8253.check')
-rw-r--r--test/files/run/t8253.check40
1 files changed, 40 insertions, 0 deletions
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 @@
+
+<sample xmlns='ns1'/>
+{
+ 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)
+ }
+}
+
+<sample xmlns={identity(ns1)}/>
+{
+ 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)
+ }
+}
+
+<sample xmlns:foo='ns1'/>
+{
+ 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)
+ }
+}
+
+<sample xmlns:foo={identity(ns1)}/>
+{
+ 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)
+ }
+}