mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
refactor cmdlist.num_cmds -> cmdlist.num_cmd to be more consistent
This commit is contained in:
parent
448458b37f
commit
88ed66e138
7 changed files with 27 additions and 27 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/13 15:21:09 by khais #+# #+# */
|
||||
/* Updated: 2025/03/18 15:05:45 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/20 11:57:29 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -84,8 +84,8 @@ void assert_pipelineequal_raw(t_pipeline *expected, t_pipeline *got)
|
|||
|
||||
void assert_pipelineequal(char *expected, t_cmdlist *cmd, int idx)
|
||||
{
|
||||
ft_printf("Expected command list %p to have at least %d pipelines, and got %d\n", cmd, idx + 1, cmd->num_cmds);
|
||||
assert(cmd->num_cmds >= idx + 1);
|
||||
ft_printf("Expected command list %p to have at least %d pipelines, and got %d\n", cmd, idx + 1, cmd->num_cmd);
|
||||
assert(cmd->num_cmd >= idx + 1);
|
||||
t_pipeline *got = cmd->cmds[idx]->inner.pipeline;
|
||||
ft_dprintf(STDERR_FILENO, "Expected pipeline %p to equal [%s]\n", got, expected);
|
||||
t_pipeline *expected_pipeline = parse_pipeline(expected);
|
||||
|
|
@ -136,7 +136,7 @@ void assert_cmdgroup_itemlistequal(char *expected_str, t_cmdgroup *got_cmd, int
|
|||
}
|
||||
ft_dprintf(STDERR_FILENO, "checking if the list matches...\n");
|
||||
int i = 0;
|
||||
while (i < expected->num_cmds)
|
||||
while (i < expected->num_cmd)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue