diff options
author | buraq <buraq@epfl.ch> | 2004-05-11 14:52:45 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2004-05-11 14:52:45 +0000 |
commit | 4fefd6bb118033c24874b799e2c15947521f10a2 (patch) | |
tree | a11135dd27db6a18e01457f26af626fe587ad45d /test/files | |
parent | 1b9f47f3e3f015944b3b92c9d5d3fde552b110b2 (diff) | |
download | scala-4fefd6bb118033c24874b799e2c15947521f10a2.tar.gz scala-4fefd6bb118033c24874b799e2c15947521f10a2.tar.bz2 scala-4fefd6bb118033c24874b799e2c15947521f10a2.zip |
seq have to be escaped
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/literals.check | 1 | ||||
-rw-r--r-- | test/files/run/literals.scala | 6 | ||||
-rw-r--r-- | test/files/run/xmlLiterals.check | 2 | ||||
-rw-r--r-- | test/files/run/xmlParsing.scala | 11 | ||||
-rw-r--r-- | test/files/run/xmlParsing_servlet.scala | 8 |
5 files changed, 22 insertions, 6 deletions
diff --git a/test/files/run/literals.check b/test/files/run/literals.check index d4b6aa1823..fc495283f4 100644 --- a/test/files/run/literals.check +++ b/test/files/run/literals.check @@ -61,3 +61,4 @@ test 1.asInstanceOf[double] == 1.0 was successful test 1l.asInstanceOf[double] == 1.0 was successful test "\u001a".length() was successful +test ggg == GGG( 2 ) was successful diff --git a/test/files/run/literals.scala b/test/files/run/literals.scala index a99c7c1be7..6d7647009d 100644 --- a/test/files/run/literals.scala +++ b/test/files/run/literals.scala @@ -9,8 +9,12 @@ object Test { import java.lang.System.out; /* I add a couple of Unicode identifier tests here temporarily */ + def \u03b1\u03c1\u03b5\u03c4\u03b7 = "alpha rho epsilon tau eta"; + case class GGG(i:int) { + def \u21a1\u21a1( that:GGG ) = that; + } def check_success[a](name: String, def closure: a, expected: a): Unit = { out.print("test " + name); try { @@ -121,6 +125,8 @@ object Test { out.println(); check_success("\"\\u001a\".length()", "\u001a".length(), 1); + val ggg = GGG( 1 ) \u21a1\u21a1 GGG( 2 ); + check_success("ggg == GGG( 2 )", ggg, GGG( 2 )); } } diff --git a/test/files/run/xmlLiterals.check b/test/files/run/xmlLiterals.check index 188d430d70..04f0426af9 100644 --- a/test/files/run/xmlLiterals.check +++ b/test/files/run/xmlLiterals.check @@ -9,7 +9,7 @@ passed ok passed ok passed ok passed ok -Seq(<foo></foo>, <bar>Text</bar>, <foo></foo>) +ArrayBuffer(<foo></foo>, <bar>Text</bar>, <foo></foo>) <foo></foo> passed ok passed ok diff --git a/test/files/run/xmlParsing.scala b/test/files/run/xmlParsing.scala index d602d9e0bc..beedf44b62 100644 --- a/test/files/run/xmlParsing.scala +++ b/test/files/run/xmlParsing.scala @@ -37,6 +37,15 @@ object Test with Application { val ent = <foo> hello character entities! welcome   unicode characters! - </foo> + </foo>; + + + val foo = <a/><b/><c/>; + + val foo2 = foo match { + case <a/><b/> => 1 + case <a></a><b></b><c></c> => 2 + case Seq(Elem("a"),Elem("b"),Elem("c")) => 3 + }; } diff --git a/test/files/run/xmlParsing_servlet.scala b/test/files/run/xmlParsing_servlet.scala index d7416c824b..7bd622b0a6 100644 --- a/test/files/run/xmlParsing_servlet.scala +++ b/test/files/run/xmlParsing_servlet.scala @@ -18,7 +18,7 @@ object Test { { headerMsg } </p> <p> - { ns } + { ns:_* } </p> <hr/> <p> @@ -37,13 +37,13 @@ object Test { */ def beautify( n:Node ):Node = n match { case <td>{ xs @ _* }</td> => - <td bgcolor="#AAAAFF" color="#222255">{ xs }</td> + <td bgcolor="#AAAAFF" color="#222255">{ xs:_* }</td> case <table>{ xs @ _* }</table> => - <table align="center">{ beautify( xs ) }</table> + <table align="center">{ beautify( xs ):_* }</table> case Elem( label, xs @ _* ) => - Elem( label, (xs.toList.map { beautify }):_*) + Elem( label, beautify( xs ):_*) case _ => n } |