test for strlen (no longer segfaults)

This commit is contained in:
LinlyBoi
2023-08-19 23:32:13 +03:00
parent 179f8618f4
commit 901478b060

19
tests/strlen.c Normal file
View File

@@ -0,0 +1,19 @@
#include "../main.h"
/**
* main - test strlen
* Return: 0 if yes, 1 if no
*/
int main(void)
{
char *str;
int len;
str = "hello";
len =_strlen(str);
if (len == 5)
return (0);
else
return (1);
}