From 2ea3b94ee2519e01a3e1658909afeb33e7e9ebe2 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 9 May 2009 03:53:41 +0000 Subject: Organized disabled directory so it works with p... Organized disabled directory so it works with partest. You can run ./partest --srcpath disabled to run the tests in that location. Fixed a few tests in disabled and pending and moved to files. --- test/disabled/script/fact.args | 1 + test/disabled/script/fact.bat | 17 +++++++++++++++++ test/disabled/script/fact.check | 1 + test/disabled/script/fact.scala | 30 ++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+) create mode 100644 test/disabled/script/fact.args create mode 100755 test/disabled/script/fact.bat create mode 100644 test/disabled/script/fact.check create mode 100644 test/disabled/script/fact.scala (limited to 'test/disabled/script') diff --git a/test/disabled/script/fact.args b/test/disabled/script/fact.args new file mode 100644 index 0000000000..7813681f5b --- /dev/null +++ b/test/disabled/script/fact.args @@ -0,0 +1 @@ +5 \ No newline at end of file diff --git a/test/disabled/script/fact.bat b/test/disabled/script/fact.bat new file mode 100755 index 0000000000..bee0ba25c6 --- /dev/null +++ b/test/disabled/script/fact.bat @@ -0,0 +1,17 @@ +::#! +:: fact - A simple Scala batch file that prints out the factorial +:: of the argument specified on the command line. + +@echo off +call scala -nocompdaemon %0 %* +goto :eof +::!# + + +val x = argv(0).toInt + +def fact(x: Int):Int = + if(x==0) 1 + else x*fact(x-1) + +Console.println("fact(" + x + ") = " + fact(x)) diff --git a/test/disabled/script/fact.check b/test/disabled/script/fact.check new file mode 100644 index 0000000000..22aa60821e --- /dev/null +++ b/test/disabled/script/fact.check @@ -0,0 +1 @@ +fact(5) = 120 diff --git a/test/disabled/script/fact.scala b/test/disabled/script/fact.scala new file mode 100644 index 0000000000..d48dac6f0f --- /dev/null +++ b/test/disabled/script/fact.scala @@ -0,0 +1,30 @@ +#!/bin/sh +# fact - A simple Scala script that prints out the factorial of +# the argument specified on the command line. + +cygwin=false; +case "`uname`" in + CYGWIN*) cygwin=true ;; +esac + +SOURCE="$0"; +if $cygwin; then + if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then + format=mixed + else + format=windows + fi + SOURCE=`cygpath --$format "$SOURCE"`; +fi + +exec scala -nocompdaemon "$SOURCE" "$@" +!# + + +val x = argv(0).toInt + +def fact(x: Int):Int = + if(x==0) 1 + else x*fact(x-1) + +Console.println("fact(" + x + ") = " + fact(x)) -- cgit v1.2.3