summaryrefslogtreecommitdiff
path: root/test/files/run/repl-javap-app.scala
blob: ad6076c2d590a25432560f6af68ca4115019fc93 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import scala.tools.partest.ReplTest

object MyApp extends App {
  Console println "Hello, delayed world."
}

object Test extends ReplTest {
  def code = ":javap -app MyApp$"

  override def welcoming = true

  // The constant pool indices are not the same for GenASM / GenBCode, so
  // replacing the exact numbers by XX.
  lazy val hasConstantPoolRef = """(.*)(#\d\d)(.*)""".r

  override def normalize(s: String) = s match {
    case hasConstantPoolRef(start, ref, end) => start + "#XX" + end
    case _ => super.normalize(s)
  }
}