summaryrefslogtreecommitdiff
path: root/test/files/run/bug2125.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/bug2125.scala')
-rw-r--r--test/files/run/bug2125.scala25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/files/run/bug2125.scala b/test/files/run/bug2125.scala
new file mode 100644
index 0000000000..053798e3db
--- /dev/null
+++ b/test/files/run/bug2125.scala
@@ -0,0 +1,25 @@
+import scala.xml._
+
+import scala.xml.transform._
+
+object Test {
+
+ val sampleXml = <xml:group><p><lost/><t><s><r></r></s></t></p></xml:group>
+
+ def main(args: scala.Array[String]) {
+ println(new RuleTransformer(new RewriteRule {
+
+ override def transform(n: Node): NodeSeq = {
+
+ val result = n match {
+
+ case <t>{_*}</t> => <q/>
+
+ case n => n
+ }
+// println ("Rewriting '" +n+ "' to: '" + result+ "'")
+ result
+ }
+ }).transform(sampleXml))
+ }
+} \ No newline at end of file