tests: put usefull test functions in own files

This commit is contained in:
Khaïs COLIN 2025-03-11 15:59:59 +01:00
parent f5ae3a5d8d
commit 9707316085
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
12 changed files with 205 additions and 132 deletions

View file

@ -6,14 +6,23 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/13 15:57:21 by khais #+# #+# */
/* Updated: 2025/03/09 12:36:44 by khais ### ########.fr */
/* Updated: 2025/03/11 16:34:10 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef TESTUTIL_H
# define TESTUTIL_H
void assert_strequal(char *str1, char *str2);
void do_leak_check(void);
# include "../src/parser/simple_cmd/simple_cmd.h"
# include "../src/parser/command_list/command_list.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);
#endif