added bgoulard lib + made lib sources in their own directory in build/ for readability
This commit is contained in:
parent
83cc8419a0
commit
0a390934d6
457 changed files with 21807 additions and 61 deletions
37
libft_personal/tests/ft_args/tests_optlist.c
Normal file
37
libft_personal/tests/ft_args/tests_optlist.c
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* tests_optlist.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/28 15:52:31 by bgoulard #+# #+# */
|
||||
/* Updated: 2024/05/28 15:52:33 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_args.h"
|
||||
#include "ft_args_types.h"
|
||||
#include <stddef.h>
|
||||
|
||||
static void empty(void *ar, char *arg)
|
||||
{
|
||||
(void)ar;
|
||||
(void)arg;
|
||||
}
|
||||
|
||||
int getset_opt_list_test(void)
|
||||
{
|
||||
const t_opt *op2 = NULL;
|
||||
const t_opt op1[] = {
|
||||
{"--test", 't', &empty, 0},
|
||||
};
|
||||
|
||||
ft_set_opt_list(op1);
|
||||
if (ft_get_opt_list() != op1)
|
||||
return (1);
|
||||
ft_set_opt_list(op2);
|
||||
if (ft_get_opt_list() != op1)
|
||||
return (2);
|
||||
return (0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue