summaryrefslogtreecommitdiff
path: root/test/files/run/bug0325.scala
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2008-01-23 11:54:50 +0000
committermichelou <michelou@epfl.ch>2008-01-23 11:54:50 +0000
commit2f56eefee4e741e38cfd58d580173a69cfd93deb (patch)
tree0c12a0dd23e3f2ee0fa2177db2ecd882401083a9 /test/files/run/bug0325.scala
parentfe9a3a692e85149351c4d14cca2e15771b5309f9 (diff)
downloadscala-2f56eefee4e741e38cfd58d580173a69cfd93deb.tar.gz
scala-2f56eefee4e741e38cfd58d580173a69cfd93deb.tar.bz2
scala-2f56eefee4e741e38cfd58d580173a69cfd93deb.zip
corrected regexp
Diffstat (limited to 'test/files/run/bug0325.scala')
-rw-r--r--test/files/run/bug0325.scala7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/files/run/bug0325.scala b/test/files/run/bug0325.scala
index 18193ff960..dc05a8d777 100644
--- a/test/files/run/bug0325.scala
+++ b/test/files/run/bug0325.scala
@@ -2,7 +2,7 @@ case class RS(self: String) {
def split(separator: Char): Array[String] = self.split("\\Q"+separator+"\\E")
def split(separators: Array[Char]): Array[String] = {
- val re = separators.foldLeft("[\\Q")(_+_) + "\\E]"
+ val re = separators.foldLeft("[")(_+"\\Q"+_+"\\E") + "]"
self.split(re)
}
}
@@ -12,9 +12,10 @@ object Test {
def test(f: => Array[String], which: String) {
try {
val ret = f.toList
- if (ret != expect) {
+ if (ret != expect)
println(which + " returned " + ret + " when expecting " + expect)
- }
+ else
+ println(ret)
} catch {
case e@_ => println(which + " failed with " + e.getClass)
}