summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-02-15 14:44:58 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-02-15 14:44:58 -0800
commit8946ff61034c808c17a4c8175ff4c69de58669eb (patch)
tree2f373d27f3adcaa8f01adf9a9d52e1fa49fe8a85 /test
parent2194e9061d4363f515d7f539a48b860182237914 (diff)
parent1dceb39bdf9d95e9f3f0887b643c7fcca6464f9e (diff)
downloadscala-8946ff61034c808c17a4c8175ff4c69de58669eb.tar.gz
scala-8946ff61034c808c17a4c8175ff4c69de58669eb.tar.bz2
scala-8946ff61034c808c17a4c8175ff4c69de58669eb.zip
Merge pull request #3532 from som-snytt/issue/7711
SI-7711 Do not emit extra argv in script body
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t7711-script-args.check2
-rw-r--r--test/files/run/t7711-script-args.scala7
-rw-r--r--test/files/run/t7711-script-args.script12
3 files changed, 21 insertions, 0 deletions
diff --git a/test/files/run/t7711-script-args.check b/test/files/run/t7711-script-args.check
new file mode 100644
index 0000000000..d107590a8a
--- /dev/null
+++ b/test/files/run/t7711-script-args.check
@@ -0,0 +1,2 @@
+Hello, scripted test!
+What good news have you for me today?
diff --git a/test/files/run/t7711-script-args.scala b/test/files/run/t7711-script-args.scala
new file mode 100644
index 0000000000..02535aa954
--- /dev/null
+++ b/test/files/run/t7711-script-args.scala
@@ -0,0 +1,7 @@
+
+import scala.tools.partest.ScriptTest
+
+object Test extends ScriptTest {
+ override def extraSettings = s"${super.extraSettings} -Xlint"
+ override def argv = Seq("good", "news")
+}
diff --git a/test/files/run/t7711-script-args.script b/test/files/run/t7711-script-args.script
new file mode 100644
index 0000000000..19b7a74924
--- /dev/null
+++ b/test/files/run/t7711-script-args.script
@@ -0,0 +1,12 @@
+#!/bin/bash
+exec ${SCALA_HOME}/bin/scala "$0" "$@" 2>&1
+!#
+
+Console println s"Hello, scripted test!"
+Console println s"What ${args mkString " "} have you for me today?"
+
+//def unused = 88
+//newSource1.scala:8: warning: private method in <$anon: AnyRef> is never used
+//Console println s"Hello, $argv, are you still here?"
+//newSource1.scala:9: error: not found: value argv
+