diff --git a/tests/parse_command_lists.c b/tests/parse_command_lists.c index a757769..5678939 100644 --- a/tests/parse_command_lists.c +++ b/tests/parse_command_lists.c @@ -82,6 +82,7 @@ static void assert_pipelineequal(char *expected, t_cmdlist *cmd, int idx) static void test_parse_command_list_empty(void) { + ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__); t_cmdlist *cmd = parse_command_list(""); assert(cmd == NULL); cmdlist_destroy(cmd); @@ -89,6 +90,7 @@ static void test_parse_command_list_empty(void) static void test_parse_command_list_single_pipeline(void) { + ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__); t_cmdlist *cmd = parse_command_list("echo this | cat -e"); assert(cmd != NULL); assert_pipelineequal("echo this | cat -e", cmd, 0); @@ -99,6 +101,7 @@ static void test_parse_command_list_single_pipeline(void) static void test_parse_command_list_simple_and(void) { + ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__); t_cmdlist *cmd = parse_command_list("echo this | cat -e && echo works | wc -c"); assert(cmd != NULL); assert_pipelineequal("echo this | cat -e", cmd, 0); @@ -110,6 +113,7 @@ static void test_parse_command_list_simple_and(void) static void test_parse_command_list_simple_or(void) { + ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__); t_cmdlist *cmd = parse_command_list("echo this | cat -e || echo works | wc -c"); assert(cmd != NULL); assert_pipelineequal("echo this | cat -e", cmd, 0); @@ -121,6 +125,7 @@ static void test_parse_command_list_simple_or(void) static void test_parse_command_list_triple_or(void) { + ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__); t_cmdlist *cmd = parse_command_list("echo this | cat -e || echo works | wc -c || echo as well | cut -d' ' -f1"); assert(cmd != NULL); assert_pipelineequal("echo this | cat -e", cmd, 0); @@ -134,6 +139,7 @@ static void test_parse_command_list_triple_or(void) static void test_parse_command_list_triple_both_operators(void) { + ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__); t_cmdlist *cmd = parse_command_list("echo this | cat -e || echo works | wc -c && echo as well | cut -d' ' -f1"); assert(cmd != NULL); assert_pipelineequal("echo this | cat -e", cmd, 0); @@ -148,6 +154,7 @@ static void test_parse_command_list_triple_both_operators(void) static void test_parse_command_list_quad_both_operators(void) { + ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__); t_cmdlist *cmd = parse_command_list("echo this | cat -e || echo works | wc -c && echo as well | cut -d' ' -f1 || echo final"); assert(cmd != NULL); assert_pipelineequal("echo this | cat -e", cmd, 0); @@ -163,6 +170,7 @@ static void test_parse_command_list_quad_both_operators(void) static void test_parse_command_list_invalid_pipeline(void) { + ft_dprintf(STDERR_FILENO, "==> %s <==\n", __FUNCTION__); t_cmdlist *cmd = parse_command_list("echo this | | cat -e || echo does not work"); assert(cmd == NULL); }