mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
here_doc: basic setup
This commit is contained in:
parent
588faccf69
commit
cae2dfe4d6
8 changed files with 60 additions and 5 deletions
1
Makefile
1
Makefile
|
|
@ -24,6 +24,7 @@ srcs = \
|
|||
src/env/env_convert.c \
|
||||
src/env/env_manip.c \
|
||||
src/env/envp.c \
|
||||
src/executing/here_doc/here_doc.c \
|
||||
src/ft_errno.c \
|
||||
src/get_command.c \
|
||||
src/parser/command_list/command_list_builder.c \
|
||||
|
|
|
|||
13
src/executing/here_doc/here_doc.c
Normal file
13
src/executing/here_doc/here_doc.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* here_doc.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/07 11:42:29 by khais #+# #+# */
|
||||
/* Updated: 2025/03/07 11:42:36 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "here_doc.h"
|
||||
18
src/executing/here_doc/here_doc.h
Normal file
18
src/executing/here_doc/here_doc.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* here_doc.h :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/07 11:41:27 by khais #+# #+# */
|
||||
/* Updated: 2025/03/07 11:42:19 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef HERE_DOC_H
|
||||
# define HERE_DOC_H
|
||||
|
||||
# include "../../parser/worddesc/worddesc.h"
|
||||
|
||||
#endif // HERE_DOC_H
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/13 17:20:36 by khais #+# #+# */
|
||||
/* Updated: 2025/03/09 12:36:22 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/11 11:13:33 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/13 15:47:58 by khais #+# #+# */
|
||||
/* Updated: 2025/03/09 12:36:05 by khais ### ########.fr */
|
||||
/* Created: 2025/03/11 11:13/50 by khais #+# #+# */
|
||||
/* Updated: 2025/03/11 11:13:50 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/13 15:46:02 by khais #+# #+# */
|
||||
/* Updated: 2025/03/10 14:27:27 by khais ### ########.fr */
|
||||
/* Created: 2025/03/11 11:14:10 by khais #+# #+# */
|
||||
/* Updated: 2025/03/11 11:14:32 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -43,5 +43,8 @@ void wordlist_debug(t_wordlist *wordlist);
|
|||
t_wordlist *wordlist_copy(const t_wordlist *wordlist);
|
||||
void wordlist_destroy_idx(t_wordlist **wordlist, int idx);
|
||||
t_worddesc *wordlist_pop_idx(t_wordlist **wordlist, int idx);
|
||||
int wordlist_size(t_wordlist *wordlist);
|
||||
t_wordlist *wordlist_last(t_wordlist *list);
|
||||
t_wordlist *wordlist_get_elem(t_wordlist *list, int idx);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
# make gets confused if a file with the same name exists in the sources, so some
|
||||
# file are prefixed with test_
|
||||
rawtests = \
|
||||
test_here_doc \
|
||||
test_wordlist_idx \
|
||||
test_redirection_parsing \
|
||||
quote_removal \
|
||||
|
|
|
|||
19
tests/test_here_doc.c
Normal file
19
tests/test_here_doc.c
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* test_here_doc.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/07 11:43:32 by khais #+# #+# */
|
||||
/* Updated: 2025/03/10 18:21:43 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include <assert.h>
|
||||
#include "testutil.h"
|
||||
#include "libft.h"
|
||||
#include <unistd.h>
|
||||
int main(void) {
|
||||
return (0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue