summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t5843.check9
-rw-r--r--test/files/run/t5843.scala15
2 files changed, 24 insertions, 0 deletions
diff --git a/test/files/run/t5843.check b/test/files/run/t5843.check
new file mode 100644
index 0000000000..2bf97f4cdb
--- /dev/null
+++ b/test/files/run/t5843.check
@@ -0,0 +1,9 @@
+ foo="1"
+ bar="2" foo="1"
+null
+ bar="2"
+ foo="1"
+ bar="2"
+ foo="1"
+ bar="2" foo="1"
+ bar="2" foo="1"
diff --git a/test/files/run/t5843.scala b/test/files/run/t5843.scala
new file mode 100644
index 0000000000..43d588c7b7
--- /dev/null
+++ b/test/files/run/t5843.scala
@@ -0,0 +1,15 @@
+object Test extends App {
+ val foo = scala.xml.Attribute(null, "foo", "1", scala.xml.Null)
+ val bar = scala.xml.Attribute(null, "bar", "2", foo)
+ println(foo)
+ println(bar)
+ println(scala.xml.TopScope.getURI(foo.pre))
+ println(bar remove "foo")
+ println(bar remove "bar")
+ println(bar remove (null, scala.xml.TopScope, "foo"))
+ println(bar remove (null, scala.xml.TopScope, "bar"))
+
+ val ns = scala.xml.NamespaceBinding(null, "uri", scala.xml.TopScope)
+ println(bar remove (null, ns, "foo"))
+ println(bar remove (null, ns, "bar"))
+}