2025-02-26 14:07:55 +01:00
|
|
|
/* ************************************************************************** */
|
|
|
|
|
/* */
|
|
|
|
|
/* ::: :::::::: */
|
2025-03-18 12:36:19 +01:00
|
|
|
/* test_cmdlist_use_after_free.c :+: :+: :+: */
|
2025-02-26 14:07:55 +01:00
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
|
/* Created: 2025/03/03 11:40:37 by khais #+# #+# */
|
2025-03-18 12:36:19 +01:00
|
|
|
/* Updated: 2025/03/18 14:23:19 by khais ### ########.fr */
|
2025-02-26 14:07:55 +01:00
|
|
|
/* */
|
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
|
|
#include "../src/parser/wordsplit/wordsplit.h"
|
|
|
|
|
#include "../src/parser/command_list/command_list.h"
|
|
|
|
|
#include "libft.h"
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
|
{
|
2025-03-18 12:36:19 +01:00
|
|
|
t_wordlist *words;
|
|
|
|
|
t_cmdlist *cmd;
|
|
|
|
|
cmd = NULL;
|
|
|
|
|
words = minishell_wordsplit("|");
|
|
|
|
|
cmd = cmdlist_from_wordlist(words);
|
2025-03-04 13:31:22 +01:00
|
|
|
wordlist_destroy(words);
|
2025-02-26 14:07:55 +01:00
|
|
|
assert(cmd == NULL);
|
|
|
|
|
return (0);
|
|
|
|
|
}
|