alelievr / libft-unit-test

457 stars 88 forks source link

strsplit #48

Closed hugodu69 closed 5 years ago

hugodu69 commented 5 years ago

I believe there is an issue on the strsplit test. this is the report of the result.log file :

ft_strsplit:   [FAILED] [OK] [OK] [OK] [OK] [OK] [OK] [OK] [OK] {protected} [fail]: your strsplit does not work with basic input Test code:         char *string = "      split       this for   me  !       ";         char expected = ((char[6]){"split", "this", "for", "me", "!", ((void )0)});         char result = ft_strsplit(string, ' ');

        split_cmp_array(expected, result);

Diffs:     strsplit: |p^Bàà°^?| ft_strsplit: |split|

it seems that my ft_strsplit works well by printing out the result "split" but your output looks weird "p^Bàà°^?", or am i wrong ?

EDIT : on my computer with linux mint it did this weird result, but on Mac everything's ok

alelievr commented 5 years ago

Hi, as said in #53, the result log for strsplit was reversed so it was your function that returned "p^Bàà°^?", it's fixed in c67374a.