From f4d0095bf538cc90bcf465fd576207db7e264c87 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 16 Aug 2009 17:13:27 +0000 Subject: A variety of work on scala.io.{ File, Source } ... A variety of work on scala.io.{ File, Source } with changes including: getLines() now takes a line separator argument (defaults to platform line.separator) and drops the newlines. scala.io.File adds several convenience methods. The mechanisms for configuring Source are more consistent. This is not complete, performance issues remain to be investigated. --- test/files/jvm/unittest_io.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/files/jvm/unittest_io.scala b/test/files/jvm/unittest_io.scala index f4f2e08c7c..9fbe0013a0 100644 --- a/test/files/jvm/unittest_io.scala +++ b/test/files/jvm/unittest_io.scala @@ -7,7 +7,7 @@ object Test extends TestConsoleMain { new ReadlinesTest ) - class ReadlinesTest extends TestCase("scala.io.Source method getLines") { + class ReadlinesTest extends TestCase("scala.io.Source method getLines()") { val src = Source.fromString(""" This is a file @@ -15,7 +15,7 @@ it is split on several lines. isn't it? """) - def runTest() = assertEquals("wrong number of lines",src.getLines.toList.length,5) // five new lines in there + def runTest() = assertEquals("wrong number of lines",src.getLines().toList.length,5) // five new lines in there //for(val line <- src.getLines) { // Console.print(line) //} -- cgit v1.2.3