diff options
Diffstat (limited to 'test/files/run/bug0325.scala')
-rw-r--r-- | test/files/run/bug0325.scala | 7 |
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) } |