summaryrefslogblamecommitdiff
path: root/test/files/run/t7791-script-linenums.scala
blob: d89b8d4c638849d6461ccbecc404361909810729 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                        
import scala.tools.partest.ScriptTest

object Test extends ScriptTest {
  object ExceptionLine {
    def unapply(e: Exception) = Some(e.getStackTrace()(0).getLineNumber)
  }
  override def show() = {
    import util._
    Try(super.show()) match {
      case Failure(ExceptionLine(7)) => ()
      case Failure(e) => e.printStackTrace()
      case Success(_) => Console println "Expected error"
    }
  }
}