aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-06-12 09:05:28 +0200
committerCharles <sircharlesaze@gmail.com>2020-06-12 12:00:27 +0200
commitf08325f76ba4aac15dc3125b7779045956863a4b (patch)
tree2f6f022dc355c41985aab9e1c188a4e9582713b9 /src/main.c
parent4e81fb861a79c9373b070176649bc0f4f8dfa850 (diff)
downloadminishell-f08325f76ba4aac15dc3125b7779045956863a4b.tar.gz
minishell-f08325f76ba4aac15dc3125b7779045956863a4b.tar.bz2
minishell-f08325f76ba4aac15dc3125b7779045956863a4b.zip
Added preprocess escape with backslash, sticky str merge, travis CI before merge
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 76c863d..42c2bd9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/28 11:45:44 by cacharle #+# #+# */
-/* Updated: 2020/06/09 17:48:03 by charles ### ########.fr */
+/* Updated: 2020/06/12 11:57:48 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -100,7 +100,20 @@ int main(int argc, char **argv, char **envp)
ft_vecpush(v, token_new(LTAG_STR, "*/*.c$TERM"));
ft_vecpush(v, token_new(LTAG_STR, "src/*.c include/*.h"));
ft_vecpush(v, token_new(LTAG_STR, "$A$B"));
- char **as = preprocess_argv(v, env);
+
+ ft_vecpush(v, token_new(LTAG_STR, "\\$TERM"));
+ ft_vecpush(v, token_new(LTAG_STR, "$TER\\M"));
+ ft_vecpush(v, token_new(LTAG_STR, "\\\\"));
+ ft_vecpush(v, token_new(LTAG_STR_SINGLE, "''''$TEST\\TEST"));
+ ft_vecpush(v, token_new(LTAG_STR_DOUBLE, ",$TEST,$B,"));
+
+ ft_vecpush(v, token_new(LTAG_STR_DOUBLE | LTAG_STICK, "$TEST"));
+ ft_vecpush(v, token_new(LTAG_STR_DOUBLE | LTAG_STICK, "$TEST"));
+ ft_vecpush(v, token_new(LTAG_STR_DOUBLE , "$TEST"));
+ ft_vecpush(v, token_new(LTAG_STR_DOUBLE | LTAG_STICK, "$TEST"));
+ ft_vecpush(v, token_new(LTAG_STR_SINGLE, "$TEST"));
+
+ char **as = preprocess(v, env);
char **tmp = as;
while (*as != NULL)