mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
29 lines
1.6 KiB
C
29 lines
1.6 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* testutil.h :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/02/13 15:57:21 by khais #+# #+# */
|
|
/* Updated: 2025/03/18 15:05:34 by khais ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef TESTUTIL_H
|
|
# define TESTUTIL_H
|
|
|
|
# include "../src/parser/simple_cmd/simple_cmd.h"
|
|
# include "../src/parser/cmdlist/cmdlist.h"
|
|
# include "../src/parser/cmdgroup/cmdgroup.h"
|
|
|
|
void assert_strequal(char *str1, char *str2);
|
|
void do_leak_check(void);
|
|
void assert_simple_commandequal(t_simple_cmd *expected, t_simple_cmd *got, int idx);
|
|
void assert_pipelineequal(char *expected, t_cmdlist *cmd, int idx);
|
|
t_worddesc *create_single_word(char *str);
|
|
void assert_pipeline_cmd_word(t_pipeline *pipeline, char *expected_word, int cmd_num, int word_num);
|
|
t_cmdgroup *parse_cmdgroup(char *input);
|
|
void assert_cmdgroup_itemlistequal(char *expected_str, t_cmdgroup *got_cmd, int item_number);
|
|
|
|
#endif
|