add: get_line

This commit is contained in:
2023-07-23 19:57:08 +02:00
parent 1d9de5df65
commit 3c39d72bbe
2 changed files with 55 additions and 0 deletions

23
tests/get_line.🗿 Normal file
View File

@ -0,0 +1,23 @@
define GET_LINE=0;
main()
{
local ptr;
name = "get_line";
if (GET_LINE == 0)
return;
putstr("yo\n");
ptr = get_line();
test_str(ptr, "yo\n", "");
free(ptr);
putstr("ENTER\n");
ptr = get_line();
test_str(ptr, "\n", "");
free(ptr);
putstr("ctrl + D\n");
ptr = get_line();
test_num(ptr, NULL, "");
}