summaryrefslogtreecommitdiff
path: root/test/files/jvm
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-06-14 15:07:51 +0000
committerburaq <buraq@epfl.ch>2004-06-14 15:07:51 +0000
commit43f2d69e0ede79d4d6ac82d86e4730fd199309d0 (patch)
tree7cd4b18a96f8532f7b05fac27657d0cef6261519 /test/files/jvm
parent2ce4da740250ae118e9edac8093ea0873911de82 (diff)
downloadscala-43f2d69e0ede79d4d6ac82d86e4730fd199309d0.tar.gz
scala-43f2d69e0ede79d4d6ac82d86e4730fd199309d0.tar.bz2
scala-43f2d69e0ede79d4d6ac82d86e4730fd199309d0.zip
new test case for ws trimming in patterns
Diffstat (limited to 'test/files/jvm')
-rw-r--r--test/files/jvm/xmlLiterals.check2
-rw-r--r--test/files/jvm/xmlLiterals.scala12
2 files changed, 12 insertions, 2 deletions
diff --git a/test/files/jvm/xmlLiterals.check b/test/files/jvm/xmlLiterals.check
index c68baec2d9..d18fa8fed5 100644
--- a/test/files/jvm/xmlLiterals.check
+++ b/test/files/jvm/xmlLiterals.check
@@ -2,6 +2,8 @@ Test01Literals
passed ok
passed ok
passed ok
+ws trimming in patterns
+passed ok
passed ok
<testTag ab="bkla" value="This is a test."></testTag>
<testTag bla="foo" value="42"></testTag>
diff --git a/test/files/jvm/xmlLiterals.scala b/test/files/jvm/xmlLiterals.scala
index 85cd3f47cf..6db3f3d823 100644
--- a/test/files/jvm/xmlLiterals.scala
+++ b/test/files/jvm/xmlLiterals.scala
@@ -41,11 +41,12 @@ object Test {
assertEquals( <hello></hello>.toString(),
noWS(<hello > </hello>.toString()));
- val x3 = <hello>
+ val xx3 = <hello>
<world></world>
<test/>
- <mars></mars></hello>.toString(); /* ws in element content */
+ <mars></mars></hello>;
+ val x3 = xx3.toString(); /* ws in element content */
assertEquals( noWS( x3 ),
Elem(0,"hello",e,
@@ -54,6 +55,13 @@ object Test {
Elem(0,"mars",e)).toString() );
+ Console.println("ws trimming in patterns");
+
+ assertEquals( true, <hello> <world/> </hello> match {
+ case <hello> <world/> </hello> => true;
+ case _ => false;} );
+
+
/* === attributes === */
val z = <html>