This repository has been archived on 2023-12-28. You can view files and clone it, but cannot push or open issues or pull requests.
c_piscine_rush_02/tests/test_ft_open.c
Aleksei Chubukov 9d56f17870 overtime
2023-12-07 20:07:15 +04:00

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());
}