0
0

add test scripts

This commit is contained in:
DrMaxNix 2022-08-13 14:14:42 +02:00
parent 2e8cafc94c
commit e650f212a0
3 changed files with 20 additions and 0 deletions

12
test/functions.jce Executable file
View 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
View File

@ -0,0 +1 @@
echo "hello world"

7
test/jumps-loops.jce Executable file
View File

@ -0,0 +1,7 @@
move $q 0
loop:
echo $q
add $q 1
ifl $q < 10
jump "loop"