✅ add test scripts
This commit is contained in:
parent
2e8cafc94c
commit
e650f212a0
12
test/functions.jce
Executable file
12
test/functions.jce
Executable file
@ -0,0 +1,12 @@
|
||||
def test $text $varname &$printed
|
||||
global ${$varname}
|
||||
mov $printed true
|
||||
echo $text " " ${$varname}
|
||||
end
|
||||
|
||||
mov $b 42
|
||||
mov $printed false
|
||||
|
||||
drw "printed? " $printed
|
||||
test "value of b is:" $b $printed
|
||||
drw "printed? " $printed
|
1
test/hello-world.jce
Executable file
1
test/hello-world.jce
Executable file
@ -0,0 +1 @@
|
||||
echo "hello world"
|
7
test/jumps-loops.jce
Executable file
7
test/jumps-loops.jce
Executable file
@ -0,0 +1,7 @@
|
||||
move $q 0
|
||||
loop:
|
||||
echo $q
|
||||
|
||||
add $q 1
|
||||
ifl $q < 10
|
||||
jump "loop"
|
Reference in New Issue
Block a user