1
0
mirror of https://github.com/Adorable-Catgirl/LuaComp.git synced 2024-11-14 22:18:05 +11:00

tests, fixed a major bug i didn't catch before

This commit is contained in:
Sam Roxanne 2021-06-25 10:27:52 -05:00
parent 9b4a7932b6
commit ddd8de4d67
8 changed files with 23 additions and 0 deletions

3
tests/bad_span.lua Normal file
View File

@ -0,0 +1,3 @@
@[{
fuck
}]

1
tests/escape_hell.lua Normal file
View File

@ -0,0 +1 @@
--#error "fuck\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"

3
tests/lua_test.lua Normal file
View File

@ -0,0 +1,3 @@
@[[for i=1, 10 do]]
print("hello @[{i}]")
@[[end]]

2
tests/noblockclose.lua Normal file
View File

@ -0,0 +1,2 @@
@[[
lmao

View File

@ -0,0 +1,2 @@
-- include file
--#include "nopreproc.lua"

1
tests/nopreproc.lua Normal file
View File

@ -0,0 +1 @@
print("test")

5
tests/runtests.sh Executable file
View File

@ -0,0 +1,5 @@
for test in $(find -name "*.lua"); do
echo "Running test $test"
luacomp $test > $test.out
echo "=============================================================="
done

6
tests/shell.lua Normal file
View File

@ -0,0 +1,6 @@
-- raw evar
print("your shell is $[{SHELL}]")
-- evar string
print("your shell is "..$(SHELL))
-- cat
$[[cat nopreproc.lua]]