Skip to content

Commit

Permalink
Handle edge case in C02/ex02
Browse files Browse the repository at this point in the history
The tests did not check if the characters between 'Z' and 'a' where handeled as not an alpha char

Dec	Hex	Oct	Html	Char
91	5B	133	[	[
92	5C	134	\	\
93	5D	135	]	]
94	5E	136	^	^
95	5F	137	_	_
96	60	140	`	`
  • Loading branch information
Forsy authored and k11q committed Jul 24, 2024
1 parent 50b2e14 commit f31236a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mini-moul/tests/C02/ex02/ft_str_is_alpha.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ int test2(void)
{
int result;

result = ft_str_is_alpha("abcdefghijk2l");
result = ft_str_is_alpha("abcghij[`aBCZ");
if (result != 0)
{
printf(" " RED "[2] ft_str_is_alpha(\"abcdefghijk2l\") Expected 0, got %d\n", result);
printf(" " RED "[2] ft_str_is_alpha(\"abcghij[`aBCZ\") Expected 0, got %d\n", result);
return (-1);
}
else
printf(" "GREEN CHECKMARK GREY" [2] ft_str_is_alpha(\"abcdefghijk2l\") Expected 0, got %d\n"DEFAULT, result);
printf(" "GREEN CHECKMARK GREY" [2] ft_str_is_alpha(\"abcghij[`aBCZ\") Expected 0, got %d\n"DEFAULT, result);
return (0);
}

Expand All @@ -54,4 +54,4 @@ int main(void)
if (test1()+test2()+test3()!=0)
return (-1);
return (0);
}
}

0 comments on commit f31236a

Please sign in to comment.