pushswap/printf/libft/tests/mandatory/split/test1.c

39 lines
1.3 KiB
C
Raw Permalink Normal View History

2023-03-07 05:42:47 +01:00
/* ************************************************************************** */
/* */
2023-10-26 19:09:02 +02:00
/* :::::::: */
/* test1.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/02/21 02:48:46 by houtworm #+# #+# */
/* Updated: 2023/10/18 17:17:11 by houtworm ######## odam.nl */
2023-03-07 05:42:47 +01:00
/* */
/* ************************************************************************** */
#include "../../tmp/libft.h"
#include <stdio.h>
#include <string.h>
int main(void)
{
int ret;
char *s0;
char *s4;
char **r;
ret = 0;
s0 = "split\0";
s4 = "!\0";
r = ft_split("split||this|for|me|||||!", '|');
if (strncmp(r[0], &s0[0], 50) || strncmp(r[4], &s4[0], 50))
ret = 1;
free(r[0]);
free(r[1]);
free(r[2]);
free(r[3]);
free(r[4]);
free(r[5]);
free(r);
return (ret);
}