leaks tests verifies et trouves
This commit is contained in:
20
testt/main.c
Normal file
20
testt/main.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "get_next_line_bonus.h"
|
||||
|
||||
int main(int ac, char **av)
|
||||
{
|
||||
int fd1;
|
||||
int i;
|
||||
char *line;
|
||||
|
||||
line = NULL;
|
||||
fd1 = open(av[1], O_RDONLY);
|
||||
if (ac < 2)
|
||||
return (0);
|
||||
while ((i = get_next_line(fd1, &line)) > 0)
|
||||
{
|
||||
printf("%s\n",line);
|
||||
free(line);
|
||||
}
|
||||
// while (1);
|
||||
return (0);
|
||||
}
|
||||
Reference in New Issue
Block a user