41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* test_ft_utils.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2023/12/03 22:39:20 by achubuko #+# #+# */
|
||
|
/* Updated: 2023/12/03 22:50:28 by achubuko ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "unity.h"
|
||
|
#include "ft_open.h"
|
||
|
|
||
|
t_file *g_f;
|
||
|
|
||
|
void setUp(void)
|
||
|
{
|
||
|
|
||
|
g_f = ft_open("test_ft_open.txt");
|
||
|
}
|
||
|
|
||
|
void tearDown(void)
|
||
|
{
|
||
|
close(g_f->descriptor);
|
||
|
free(g_f);
|
||
|
}
|
||
|
|
||
|
void test_ft_dispence_line_once(void)
|
||
|
{
|
||
|
TEST_ASSERT_EQUAL_STRING("hello World!", ft_dispence_line(g_f));
|
||
|
}
|
||
|
|
||
|
int main(void)
|
||
|
{
|
||
|
UNITY_BEGIN();
|
||
|
RUN_TEST(test_ft_dispence_line_once);
|
||
|
return (UNITY_END());
|
||
|
}
|