From 1dceb39bdf9d95e9f3f0887b643c7fcca6464f9e Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Fri, 14 Feb 2014 13:58:58 -0800 Subject: SI-7711 Test for args in script Compiles with -Xlint to ensure there are no lurkers. Updates `ScriptTest` to pass args to the script. It's called `argv` partly as homage, partly because `args` is an `Array`. --- test/files/run/t7711-script-args.script | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/files/run/t7711-script-args.script (limited to 'test/files/run/t7711-script-args.script') 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 + -- cgit v1.2.3