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

libft: get error in command francinette and OK in command paco, ft_putstr_fd and ft_putendl_fd #67

Open
EvertonVaz opened this issue Aug 3, 2023 · 1 comment

Comments

@EvertonVaz
Copy link

When I run the command francinette to test the entire libft,
I get an error in two functions

Summary:

Failed tests: putendl_fd, putstr_fd

Errors found:

For ft_putstr_fd, in
/nfs/homes/usr/francinette/tests/libft/fsoares/test_putstr_fd.c:

Error in test 5: ft_putstr_fd("\nend!", fd: -1): expected:
"abcdef\n1234\t567\nend!", content of the file: ""

For ft_putendl_fd, in
/nfs/homes/usr/francinette/tests/libft/fsoares/test_putendl_fd.c:

Error in test 5: ft_putendl_fd("end!", fd: -1): expected:
"\nabcdef\n1234\n567\nend!\n", content of the file: ""

And when I run all functions I get OK

✔ Compiling tests: fsoares (my own)
ℹ Testing:
ft_putendl_fd : OK
ft_putstr_fd : OK

And the fd -1 really doesn't exist, I thought of solving it in a very simple way, only checking if fd is -1 and turning it into a positive number...

solismesmo added a commit to solismesmo/francinette that referenced this issue Aug 9, 2023
… at functions: ft_putstr_fd, ft_putnbr_fd and ft_putendl_fd. The file to be opened did not have the correct permissions (write and read). It was added 'S_IRWXU' flag to 'open' of 'fd' variable

 Changes to be committed:
	modified:   tests/libft/fsoares/test_putendl_fd.c
	modified:   tests/libft/fsoares/test_putnbr_fd.c
	modified:   tests/libft/fsoares/test_putstr_fd.c
@solismesmo
Copy link

Solution of the problem: #68

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

2 participants