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
19
void
builtin_pipe_test
(
t_ms_data
*data);
20
void
pipe_tests
(
t_ms_data
*data);
21
22
void
pipe_tests
(
t_ms_data
*data)
23
{
24
ft_printf
(
"\nPIPE TESTS\n"
);
25
builtin_pipe_test
(data);
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
32
void
builtin_pipe_test
(
t_ms_data
*data)
33
{
34
data->
args
=
ft_split
(
"ls -l | wc -l"
,
' '
);
35
builtin_pipe
(node, data);
36
assert(data->
args
!= NULL);
37
}
libft.h
ft_printf
int ft_printf(const char *format,...)
Definition
ft_printf.c:37
ft_split
char ** ft_split(char const *s, char c)
Definition
ft_split.c:95
pipe.h
builtin_pipe
int builtin_pipe(t_ast *node, t_ms_data *data)
Definition
pipe.c:46
builtin_pipe_test
void builtin_pipe_test(t_ms_data *data)
Definition
pipe_test.c:32
pipe_tests
void pipe_tests(t_ms_data *data)
Definition
pipe_test.c:22
shell.h
s_ms_data
Definition
shell.h:21
s_ms_data::args
char ** args
Definition
shell.h:23
src
test
pipe
pipe_test.c
Generated by
1.9.8