maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
pipe_test.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* pipe_test.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: dmdemirk <dmdemirk@student.42london.c +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2024/06/17 11:03:20 by dmdemirk #+# #+# */
9/* Updated: 2024/07/11 18:44:58 by dmdemirk ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include <assert.h>
14#include <stdio.h>
15#include "shell.h"
16#include "pipe.h"
17#include "libft.h"
18
20void pipe_tests(t_ms_data *data);
21
23{
24 ft_printf("\nPIPE TESTS\n");
26 ft_printf("\033[0m");
27 ft_printf("\033[0;32m");
28 ft_printf("pipe_test -> OK\n");
29 ft_printf("\033[0m");
30}
31
33{
34 data->args = ft_split("ls -l | wc -l", ' ');
35 builtin_pipe(node, data);
36 assert(data->args != NULL);
37}
int ft_printf(const char *format,...)
Definition ft_printf.c:37
char ** ft_split(char const *s, char c)
Definition ft_split.c:95
int builtin_pipe(t_ast *node, t_ms_data *data)
execute pipe when | is found in the command
Definition pipe.c:35
void builtin_pipe_test(t_ms_data *data)
Definition pipe_test.c:32
void pipe_tests(t_ms_data *data)
Definition pipe_test.c:22
char ** args
Definition shell.h:23