diff options
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t4625c.check | 3 | ||||
-rw-r--r-- | test/files/run/t4625c.scala | 7 | ||||
-rw-r--r-- | test/files/run/t4625c.script | 6 |
3 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t4625c.check b/test/files/run/t4625c.check new file mode 100644 index 0000000000..6acb1710b9 --- /dev/null +++ b/test/files/run/t4625c.check @@ -0,0 +1,3 @@ +newSource1.scala:2: warning: Script has a main object but statement is disallowed +val x = "value x" + ^ diff --git a/test/files/run/t4625c.scala b/test/files/run/t4625c.scala new file mode 100644 index 0000000000..44f6225220 --- /dev/null +++ b/test/files/run/t4625c.scala @@ -0,0 +1,7 @@ + +import scala.tools.partest.ScriptTest + +object Test extends ScriptTest { + // must be called Main to get probing treatment in parser + override def testmain = "Main" +} diff --git a/test/files/run/t4625c.script b/test/files/run/t4625c.script new file mode 100644 index 0000000000..fa14f43950 --- /dev/null +++ b/test/files/run/t4625c.script @@ -0,0 +1,6 @@ + +val x = "value x" + +object Main extends App { + println(s"Test ran with $x.") +} |