Skip to content

Commit f31236a

Browse files
Forsyk11q
authored andcommitted
Handle edge case in C02/ex02
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 ` `
1 parent 50b2e14 commit f31236a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mini-moul/tests/C02/ex02/ft_str_is_alpha.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ int test2(void)
2323
{
2424
int result;
2525

26-
result = ft_str_is_alpha("abcdefghijk2l");
26+
result = ft_str_is_alpha("abcghij[`aBCZ");
2727
if (result != 0)
2828
{
29-
printf(" " RED "[2] ft_str_is_alpha(\"abcdefghijk2l\") Expected 0, got %d\n", result);
29+
printf(" " RED "[2] ft_str_is_alpha(\"abcghij[`aBCZ\") Expected 0, got %d\n", result);
3030
return (-1);
3131
}
3232
else
33-
printf(" "GREEN CHECKMARK GREY" [2] ft_str_is_alpha(\"abcdefghijk2l\") Expected 0, got %d\n"DEFAULT, result);
33+
printf(" "GREEN CHECKMARK GREY" [2] ft_str_is_alpha(\"abcghij[`aBCZ\") Expected 0, got %d\n"DEFAULT, result);
3434
return (0);
3535
}
3636

@@ -54,4 +54,4 @@ int main(void)
5454
if (test1()+test2()+test3()!=0)
5555
return (-1);
5656
return (0);
57-
}
57+
}

0 commit comments

Comments
 (0)