debug: worddesc show more information

This seems appropriate since worddescs are getting more and more complex:
markers, flags, tokentypes, ...
This commit is contained in:
Khaïs COLIN 2025-04-09 15:38:13 +02:00
parent 6576c47b56
commit 4d6a64bf6a
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
9 changed files with 83 additions and 25 deletions

View file

@ -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;