diff options
author | Paul Phillips <paulp@improving.org> | 2009-08-16 17:13:27 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-08-16 17:13:27 +0000 |
commit | f4d0095bf538cc90bcf465fd576207db7e264c87 (patch) | |
tree | df02c4f97ec7cce8cb9507688cd555e4e8b04073 /test | |
parent | 110b737f99c4e4850f9a0f861db6b9f831ae056e (diff) | |
download | scala-f4d0095bf538cc90bcf465fd576207db7e264c87.tar.gz scala-f4d0095bf538cc90bcf465fd576207db7e264c87.tar.bz2 scala-f4d0095bf538cc90bcf465fd576207db7e264c87.zip |
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.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm/unittest_io.scala | 4 |
1 files changed, 2 insertions, 2 deletions
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) //} |