diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2011-11-02 14:34:35 +0000 |
commit | b6778be91900b8161e705dc2598ef7af86842b0b (patch) | |
tree | d15e8ec18a37eec212f50f1ace27714d7e7d4d34 /test/disabled/run/script-positions.scala | |
parent | ac6c76f26d884a94d0c9ff54f055d3f9ab750bac (diff) | |
download | scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.gz scala-b6778be91900b8161e705dc2598ef7af86842b0b.tar.bz2 scala-b6778be91900b8161e705dc2598ef7af86842b0b.zip |
Begone t1737...
Diffstat (limited to 'test/disabled/run/script-positions.scala')
-rw-r--r-- | test/disabled/run/script-positions.scala | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/disabled/run/script-positions.scala b/test/disabled/run/script-positions.scala index 6982ed8440..2c80d550c0 100644 --- a/test/disabled/run/script-positions.scala +++ b/test/disabled/run/script-positions.scala @@ -4,9 +4,9 @@ import util.stringFromStream // Testing "scripts" without the platform delights which accompany actual scripts. object Scripts { - val test1 = -"""#!/bin/sh - exec scala $0 $@ + val test1 = +"""#!/bin/sh + exec scala $0 $@ !# println("statement 1") @@ -29,7 +29,7 @@ val x = "line 6" val y = "line 7" val z "line 8"""" - val output2 = + val output2 = """bob.scala:8: error: '=' expected but string literal found. val z "line 8" ^ @@ -41,10 +41,10 @@ two errors found""" object Test { import Scripts._ - + def settings = new GenericRunnerSettings(println _) settings.nocompdaemon.value = true - + def runScript(code: String): String = stringFromStream(stream => Console.withOut(stream) { @@ -53,7 +53,7 @@ object Test { } } ) - + val tests: List[(String, String)] = List( test1 -> output1, test2 -> output2 @@ -67,14 +67,14 @@ object Test { case idx => s drop (idx + 7) } def toLines(text: String) = lines(text) map stripFilename - + def main(args: Array[String]): Unit = { - for ((code, expected) <- tests) { + for ((code, expected) <- tests) { val out = toLines(runScript(code)) val exp = toLines(expected) val nomatch = out zip exp filter { case (x, y) => x != y } val success = out.size == exp.size && nomatch.isEmpty - + assert( success, "Output doesn't match expected:\n" + |