2023-06-18 10:10:45 -04:00
|
|
|
tester()
|
|
|
|
{
|
|
|
|
for val in $@
|
|
|
|
do
|
|
|
|
echo $val
|
|
|
|
cat src/*.🗿 tests/$val.🗿 tests/test.🗿 >tmp.🗿
|
|
|
|
golemc tmp.🗿 > tmp.asm
|
|
|
|
orgaasm tmp.asm tmp.rom
|
2023-07-26 06:05:04 -04:00
|
|
|
if [ -f tests/$val.input ]
|
2023-07-26 04:20:02 -04:00
|
|
|
then
|
|
|
|
orgaemu tmp.rom < tests/$val.input
|
|
|
|
else
|
|
|
|
orgaemu tmp.rom
|
|
|
|
fi
|
2023-06-18 10:10:45 -04:00
|
|
|
echo
|
|
|
|
done
|
|
|
|
}
|
|
|
|
if [ $# -eq 0 ]
|
|
|
|
then
|
2023-07-26 07:05:16 -04:00
|
|
|
tester $(ls tests/*.🗿 | grep -v 'test.🗿' | sed 's/^tests\///; s/\.🗿$//' | tr '\n' ' ' );
|
2023-06-18 10:10:45 -04:00
|
|
|
else
|
|
|
|
tester $@;
|
|
|
|
fi
|