diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/files/jvm/mkLibNatives.bat | 2 | ||||
-rwxr-xr-x | test/files/script/fact.bat | 17 | ||||
-rwxr-xr-x | test/files/script/second.bat | 3 | ||||
-rwxr-xr-x | test/files/script/t1015.bat | 12 | ||||
-rwxr-xr-x | test/files/script/t1017.bat | 15 | ||||
-rwxr-xr-x | test/files/script/utf8.bat | 11 |
6 files changed, 59 insertions, 1 deletions
diff --git a/test/files/jvm/mkLibNatives.bat b/test/files/jvm/mkLibNatives.bat index 7fc88f91c3..045afe0ca2 100755 --- a/test/files/jvm/mkLibNatives.bat +++ b/test/files/jvm/mkLibNatives.bat @@ -16,7 +16,7 @@ set STDOUT=NUL if %DEBUG%==1 set STDOUT=CON
set CLASS_NAME=Test$
-set CLASS_DIR=natives-jvm
+set CLASS_DIR=.
set OBJ_NAME=natives
set LIB_NAME=natives-32
diff --git a/test/files/script/fact.bat b/test/files/script/fact.bat new file mode 100755 index 0000000000..bee0ba25c6 --- /dev/null +++ b/test/files/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/files/script/second.bat b/test/files/script/second.bat new file mode 100755 index 0000000000..222372d543 --- /dev/null +++ b/test/files/script/second.bat @@ -0,0 +1,3 @@ +@echo off + +scala -nocompdaemon -e "println(\"My second argument is \" + args(1))" arg1 arg2 diff --git a/test/files/script/t1015.bat b/test/files/script/t1015.bat new file mode 100755 index 0000000000..7475313d7e --- /dev/null +++ b/test/files/script/t1015.bat @@ -0,0 +1,12 @@ +::#!
+:: t1015 - <description>.
+
+@echo off
+call scala -nocompdaemon %0 %*
+goto :eof
+::!#
+
+case class Test(one : Int, two : Int)
+object Test{
+ def apply(one : Int): Test = Test(one, 2);
+}
diff --git a/test/files/script/t1017.bat b/test/files/script/t1017.bat new file mode 100755 index 0000000000..369dbd2aca --- /dev/null +++ b/test/files/script/t1017.bat @@ -0,0 +1,15 @@ +::#!
+::# t1017 - <description>.
+
+@echo off
+call scala -nocompdaemon %0 %*
+goto :eof
+::!#
+
+def foo = {
+ bar
+}
+
+var x = 1
+
+def bar = 1
diff --git a/test/files/script/utf8.bat b/test/files/script/utf8.bat new file mode 100755 index 0000000000..8bc5c886f7 --- /dev/null +++ b/test/files/script/utf8.bat @@ -0,0 +1,11 @@ +::#!
+:: utf8 - <description>.
+
+@echo off
+call scala -nocompdaemon %0 %*
+goto :eof
+::!#
+
+/*Comment Комментарий*/
+Console.println("QWERTY");
+Console.println("ЙЦУКЕН");
|