-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putstr_fd_test.c
33 lines (30 loc) · 1.32 KB
/
ft_putstr_fd_test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd_test.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abenamar <abenamar@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/09 03:27:34 by abenamar #+# #+# */
/* Updated: 2022/12/28 22:04:34 by abenamar ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_test.h"
void ft_putstr_fd_test(void)
{
int fd = open("/dev/null", O_WRONLY);
if (fd == -1)
return ;
printf(RESET "\nft_putstr_fd\t");
ft_putstr_fd("", fd);
printf(BOLDGREEN "1. OK\t");
ft_putstr_fd("abcde", fd);
printf(BOLDGREEN "2. OK\t");
ft_putstr_fd("12345", fd);
printf(BOLDGREEN "3. OK\t");
ft_putstr_fd("\t \b", fd);
printf(BOLDGREEN "4. OK\t");
ft_putstr_fd("\0\0\0", fd);
printf(BOLDGREEN "5. OK\t");
close(fd);
}