Skip to content

Commit 210f1c4

Browse files
committed
Added test scripts
1 parent 7515e88 commit 210f1c4

13 files changed

Lines changed: 110 additions & 1 deletion

interpreter.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ loadScrit <- function(){
1818
}
1919
return(fileName)
2020
}
21-
21+
if (!require("parallel")) install.packages("parallel") # The new parallel version requires library parallels
22+
library(parallel)
2223
script <- suppressWarnings(readLines("mainScript.interOp")) #This triggers a warning but not an concern
2324
# From loading from a file have to conver to table matrix
2425
script <- as.matrix(script)

scripts/bat.interOp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
testBat
2+
**bat
3+
echo hi
4+
echo hi again
5+
6+
**/
7+
** testBat

scripts/dart.interOp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
testDart
2+
**dart
3+
void main() {
4+
print('Hello, World! from dart');
5+
}
6+
**/
7+
** testDart

scripts/elixir.interOp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
testElixir
2+
**Elixir
3+
IO.puts "Hello world from Elixir"
4+
**/
5+
6+
** testElixir

scripts/go.interOp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
goTest
2+
**go
3+
package main
4+
import "os"
5+
import "fmt"
6+
func main() {
7+
arg := os.Args[1]
8+
fmt.Println(arg)
9+
}
10+
**/
11+
12+
** goTest 4

scripts/java.interOp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
HelloWorld
2+
**java
3+
public class HelloWorld {
4+
5+
public static void main(String[] args) {
6+
// Prints "Hello, World" to the terminal window.
7+
System.out.println("Hello, World from java");
8+
}
9+
10+
}
11+
**/
12+
13+
** HelloWorld

scripts/js.interOp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
jsTest
2+
**js
3+
var x = 2;
4+
console.log(x);
5+
**/
6+
** jsTest

scripts/lua.interOp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
luaTest
2+
**lua
3+
function fact (n)
4+
if n == 0 then
5+
return 1
6+
else
7+
return n * fact(n-1)
8+
end
9+
end
10+
11+
--print("enter a number:")
12+
--a = io.read("*number")
13+
print(fact(arg[1]))
14+
--If you are using Lua
15+
16+
**/
17+
** luaTest 7

scripts/perl.interOp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
testPerl
2+
**perl
3+
print "Hello, world!\n";
4+
print qq=Did you say "Hello?"\n=;
5+
print "$ARGV[0]\n";
6+
**/
7+
** testPerl 3

scripts/python.interOp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pythonTest
2+
**python
3+
4+
x = 3
5+
print(x)
6+
**/
7+
8+
** pythonTest

0 commit comments

Comments
 (0)