add: geadline test
This commit is contained in:
parent
c41ebf6ff5
commit
106d2da5a0
7
test.sh
7
test.sh
@ -6,7 +6,12 @@ tester()
|
||||
cat src/*.🗿 tests/$val.🗿 tests/test.🗿 >tmp.🗿
|
||||
golemc tmp.🗿 > tmp.asm
|
||||
orgaasm tmp.asm tmp.rom
|
||||
orgaemu tmp.rom
|
||||
if [ $val == "geadline" ]
|
||||
then
|
||||
orgaemu tmp.rom < tests/$val.input
|
||||
else
|
||||
orgaemu tmp.rom
|
||||
fi
|
||||
echo
|
||||
done
|
||||
}
|
||||
|
3
tests/geadline.input
Normal file
3
tests/geadline.input
Normal file
@ -0,0 +1,3 @@
|
||||
yo
|
||||
bozo
|
||||
z^[[Dbo^[[C^[[C^[[Co
|
22
tests/geadline.🗿
Normal file
22
tests/geadline.🗿
Normal file
@ -0,0 +1,22 @@
|
||||
main()
|
||||
{
|
||||
local ptr;
|
||||
|
||||
name = "geadline";
|
||||
|
||||
ptr = geadline("");
|
||||
test_str(ptr, "yo", "");
|
||||
free(ptr);
|
||||
|
||||
ptr = geadline("");
|
||||
test_str(ptr, "bozo", "");
|
||||
free(ptr);
|
||||
|
||||
ptr = geadline("");
|
||||
test_str(ptr, "bozo", "arrow");
|
||||
free(ptr);
|
||||
|
||||
ptr = geadline("");
|
||||
test_num(ptr, 0, "");
|
||||
free(ptr);
|
||||
}
|
Loading…
Reference in New Issue
Block a user