summaryrefslogtreecommitdiff
path: root/test/files/run/t2721.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t2721.scala')
-rw-r--r--test/files/run/t2721.scala12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/files/run/t2721.scala b/test/files/run/t2721.scala
new file mode 100644
index 0000000000..8bd03bc838
--- /dev/null
+++ b/test/files/run/t2721.scala
@@ -0,0 +1,12 @@
+object Test
+{
+ val xml1 = <root xmlns:ns="nsUri" ns:at="rootVal"><sub ns:at="subVal"/></root>
+ val xml2= scala.xml.XML.loadString("""<root xmlns:ns="nsUri" ns:at="rootVal"><sub ns:at="subVal"/></root>""")
+
+ def backslashSearch(x: xml.Elem) = "root:-"+(x \ "@{nsUri}at") +"-sub:-"+(x \ "sub" \ "@{nsUri}at") +"-"
+
+ def main(args: Array[String]): Unit = {
+ println(backslashSearch(xml1))
+ println(backslashSearch(xml2))
+ }
+}