Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_next_line, test 40 fails when multiple fd is not supported with BUFF_SIZE = 3 or 6 or7 #71

Open
nmanzini opened this issue Dec 7, 2017 · 0 comments

Comments

@nmanzini
Copy link

nmanzini commented Dec 7, 2017

Problem

if the user's get_next_line.c does not support multiple file descriptors test (like mine used to do) 30_bonus_multiple_fd.spec.c leaves chars in the buffer, but only if the BUFF SIZE is 3 6 or 7. This can make 40_hard_test_medium_string.spec.c fail.

reasons

the first test of 30 is passed also with no multiple FD supported ("aaa\nbbb\n"), but the second one fails ("111\n222\n") and some combination of 222 is left in the static variable for next time.

going to test 40_hard_test_medium_string.spec.c some of those 222 stays in the static variable and can result into false negative. in my case at the beginning of every call of the function I would check if there were still chars in the static variable and pass them to *line.
My Lorem Ipsum... would always have some combination of 222 at the beginning if BUFF SIZE is 3 or 6 or 7.

bouns image

screen shot 2017-12-07 at 2 53 11 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant