35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* test_char_isspace.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/05/23 16:32:37 by bgoulard #+# #+# */
|
|
/* Updated: 2024/05/23 21:25:51 by bgoulard ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "ft_char.h"
|
|
|
|
static int local_isspace(int c)
|
|
{
|
|
if (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t'
|
|
|| c == '\v')
|
|
return (1);
|
|
return (0);
|
|
}
|
|
|
|
int test_ft_isspace(void)
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (i < 256)
|
|
{
|
|
if (ft_isspace(i) != local_isspace(i))
|
|
return (1);
|
|
i++;
|
|
}
|
|
return (0);
|
|
}
|