diff options
Diffstat (limited to 'test/junit/scala/io/SourceTest.scala')
-rw-r--r-- | test/junit/scala/io/SourceTest.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/junit/scala/io/SourceTest.scala b/test/junit/scala/io/SourceTest.scala index 3138a4589c..3fe48940a0 100644 --- a/test/junit/scala/io/SourceTest.scala +++ b/test/junit/scala/io/SourceTest.scala @@ -28,6 +28,10 @@ class SourceTest { @Test def canIterateLines() = { assertEquals(sampler.lines.size, (Source fromString sampler).getLines.size) } + @Test def loadFromResource() = { + val res = Source.fromResource("rootdoc.txt") + assertTrue("No classpath resource found", res.getLines().size > 5) + } @Test def canCustomizeReporting() = { class CapitalReporting(is: InputStream) extends BufferedSource(is) { override def report(pos: Int, msg: String, out: PrintStream): Unit = { |