summaryrefslogtreecommitdiff
path: root/test/files/run/t7634.scala
diff options
context:
space:
mode:
authorAntoine Gourlay <antoine@gourlay.fr>2013-10-16 17:55:49 +0200
committerAntoine Gourlay <antoine@gourlay.fr>2013-11-06 17:35:03 +0100
commit490f946fc804358109098f0404e6483635e1d055 (patch)
treef20515f4054ffd0023a95986a69c54843a0e4ae2 /test/files/run/t7634.scala
parentae47ccc35bdcfbdb965e2297b131a2416495d4e7 (diff)
downloadscala-490f946fc804358109098f0404e6483635e1d055.tar.gz
scala-490f946fc804358109098f0404e6483635e1d055.tar.bz2
scala-490f946fc804358109098f0404e6483635e1d055.zip
SI-7634 resurrect the REPL's :sh command
ProcessResult had a companion object in 2.10 that somehow disappeared in 2.11. It only called "new ProcessResult(...)", so the REPL might just as well do that.
Diffstat (limited to 'test/files/run/t7634.scala')
-rw-r--r--test/files/run/t7634.scala22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/t7634.scala b/test/files/run/t7634.scala
new file mode 100644
index 0000000000..aeb6a5e671
--- /dev/null
+++ b/test/files/run/t7634.scala
@@ -0,0 +1,22 @@
+import java.io.File
+import scala.tools.partest.ReplTest
+import scala.util.Properties.propOrElse
+
+/**
+* filter out absolute path to java
+* filter: java
+*/
+object Test extends ReplTest {
+ def java = propOrElse("javacmd", "java")
+ def code = s""":sh $java -classpath $testOutput hello.Hello
+ |.lines""".stripMargin
+}
+
+package hello {
+ object Hello {
+ def main(a: Array[String]) {
+ System.out.println("shello, world.")
+ }
+ }
+}
+