Working on a test suite

This commit is contained in:
lalgarra 2025-10-29 19:35:19 +01:00
parent f595a3640f
commit ee59b93faa
7 changed files with 1302 additions and 8 deletions

View file

@ -6,7 +6,7 @@
/* By: lalgarra <lalgarra@student.42madrid.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/10/22 20:50:52 by lalgarra #+# #+# */
/* Updated: 2025/10/25 13:58:21 by lalgarra ### ########.fr */
/* Updated: 2025/10/26 23:21:13 by lalgarra ### ########.fr */
/* */
/* ************************************************************************** */
@ -27,15 +27,20 @@ int main(int argc, char *argv[])
fd = 0;
if (argc > 1)
fd = open(argv[1], O_RDONLY);
/*
if (fd < 0)
return (1);
*/
stop = 0;
while (!stop)
{
line = get_next_line(fd);
printf("%s", line);
stop = line == NULL;
free(line);
if (!stop)
{
printf("%s", line);
free(line);
}
}
if (fd > 0)
close(fd);