mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
debug: worddesc show more information
This seems appropriate since worddescs are getting more and more complex: markers, flags, tokentypes, ...
This commit is contained in:
parent
6576c47b56
commit
4d6a64bf6a
9 changed files with 83 additions and 25 deletions
|
|
@ -5,8 +5,8 @@
|
|||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/27 14:05/00 by khais #+# #+# */
|
||||
/* Updated: 2025/03/27 14:05:00 by khais ### ########.fr */
|
||||
/* Created: 2025/04/09 15:50/06 by khais #+# #+# */
|
||||
/* Updated: 2025/04/09 15:50:06 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -213,7 +213,6 @@ static void test_filename_star_expansion(void)
|
|||
//test ., .. and .plop
|
||||
filepattern = create_single_word(".*");
|
||||
expanded = expand_star(filepattern);
|
||||
wordlist_debug(expanded);
|
||||
assert(wordlist_size(expanded) == 3);
|
||||
assert_strequal(".", expanded->word->word);
|
||||
assert_strequal("..", expanded->next->word->word);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/10 14:59:19 by khais #+# #+# */
|
||||
/* Updated: 2025/04/08 16:35:12 by khais ### ########.fr */
|
||||
/* Updated: 2025/04/09 15:50:20 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -50,7 +50,6 @@ static void test_wordlist_idx_pop_second_then_first(void)
|
|||
ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__);
|
||||
list = wordlist_create(worddesc_create(ft_strdup("hello"), 0, NULL, WORD_TOKEN));
|
||||
list = wordlist_push(list, worddesc_create(ft_strdup("world"), 0, NULL, WORD_TOKEN));
|
||||
wordlist_debug(list);
|
||||
got = wordlist_pop_idx(&list, 1);
|
||||
assert(NULL != got);
|
||||
assert(NULL != list);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/13 15:21:09 by khais #+# #+# */
|
||||
/* Updated: 2025/03/20 11:57:29 by khais ### ########.fr */
|
||||
/* Updated: 2025/04/09 15:49:47 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -65,13 +65,6 @@ void assert_simple_commandequal(t_simple_cmd *expected, t_simple_cmd *got, int i
|
|||
void assert_pipelineequal_raw(t_pipeline *expected, t_pipeline *got)
|
||||
{
|
||||
assert(expected == got || expected != NULL);
|
||||
int j = 0;
|
||||
while (j < got->num_cmd)
|
||||
{
|
||||
ft_dprintf(STDERR_FILENO, "Got pipeline cmd %d: ", j);
|
||||
wordlist_debug(got->cmds[j]->words);
|
||||
j++;
|
||||
}
|
||||
ft_dprintf(STDERR_FILENO, "Expected pipeline to have %d commands, got pipeline with %d\n", expected->num_cmd, got->num_cmd);
|
||||
assert(expected->num_cmd == got->num_cmd);
|
||||
int i = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue