debug de heredoc
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
|
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/12/01 16:07:48 by lperrey ### ########.fr */
|
/* Updated: 2021/12/05 09:28:00 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@@ -19,6 +19,7 @@ int exec_cmd_line(t_all *c)
|
|||||||
free_pipeline(&c->pipeline);
|
free_pipeline(&c->pipeline);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
//write(1, "here\n", 5);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/10/24 10:52:40 by lperrey #+# #+# */
|
/* Created: 2021/10/24 10:52:40 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/12/02 15:55:32 by hulamy ### ########.fr */
|
/* Updated: 2021/12/04 16:06:48 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/11/11 18:46:43 by lperrey #+# #+# */
|
/* Created: 2021/11/11 18:46:43 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/12/02 15:32:56 by hulamy ### ########.fr */
|
/* Updated: 2021/12/05 10:58:56 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/11/11 18:46:43 by lperrey #+# #+# */
|
/* Created: 2021/11/11 18:46:43 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/11/29 12:39:05 by lperrey ### ########.fr */
|
/* Updated: 2021/12/04 16:05:46 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
|
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
|
||||||
/* Updated: 2021/12/03 07:06:35 by hulamy ### ########.fr */
|
/* Updated: 2021/12/04 16:08:48 by hulamy ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|||||||
27
tests/unit_tests/file.log
Normal file
27
tests/unit_tests/file.log
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
[01;32msimplonco@simplonco-Latitude-E6320[00m:[01;34m~/Nextcloud/informatique/42/minishell/minishell/tests/unit_tes
|
||||||
|
sts[00m$ echo "hugo"
|
||||||
|
hugo
|
||||||
|
[01;32msimplonco@simplonco-Latitude-E6320[00m:[01;34m~/Nextcloud/informatique/42/minishell/minishell/tests/unit_tes
|
||||||
|
sts[00m$ cat << EOF
|
||||||
|
>
|
||||||
|
file.log unitests.sh ut_expensions.sh ut_to_do_manually.sh
|
||||||
|
logs/ ut_bonus.sh ut_heredocs.sh ut_vrac.sh
|
||||||
|
minishell ut_builtins.sh ut_pipes.sh wip/
|
||||||
|
tests_discord.md ut_exit_status.sh ut_redirections.sh
|
||||||
|
>
|
||||||
|
file.log unitests.sh ut_expensions.sh ut_to_do_manually.sh
|
||||||
|
logs/ ut_bonus.sh ut_heredocs.sh ut_vrac.sh
|
||||||
|
minishell ut_builtins.sh ut_pipes.sh wip/
|
||||||
|
tests_discord.md ut_exit_status.sh ut_redirections.sh
|
||||||
|
> hello you
|
||||||
|
>
|
||||||
|
file.log unitests.sh ut_expensions.sh ut_to_do_manually.sh
|
||||||
|
logs/ ut_bonus.sh ut_heredocs.sh ut_vrac.sh
|
||||||
|
minishell ut_builtins.sh ut_pipes.sh wip/
|
||||||
|
tests_discord.md ut_exit_status.sh ut_redirections.sh
|
||||||
|
>
|
||||||
|
file.log unitests.sh ut_expensions.sh ut_to_do_manually.sh
|
||||||
|
logs/ ut_bonus.sh ut_heredocs.sh ut_vrac.sh
|
||||||
|
minishell ut_builtins.sh ut_pipes.sh wip/
|
||||||
|
tests_discord.md ut_exit_status.sh ut_redirections.sh
|
||||||
|
> EOF
|
||||||
@@ -2,59 +2,9 @@
|
|||||||
[1;33m
|
[1;33m
|
||||||
|
|
||||||
|
|
||||||
file: ut_vrac.sh
|
file: ut_heredocs.sh
|
||||||
[0m[1;37m
|
[0m[1;37m
|
||||||
|
|
||||||
$
|
COMMANDE=' echo "hugo"'
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
file_name_in_current_dir
|
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
/bin/echo bonjour
|
|
||||||
-----------[0m
|
|
||||||
bonjour
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
not_cmd
|
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
echo bonjour > $test w/ t
|
|
||||||
ls
|
|
||||||
rm '$test'
|
|
||||||
-----------[0m
|
|
||||||
logs
|
|
||||||
minishell
|
|
||||||
tests_discord.md
|
|
||||||
unitests.sh
|
|
||||||
ut_bonus.sh
|
|
||||||
ut_builtins.sh
|
|
||||||
ut_exit_status.sh
|
|
||||||
ut_expensions.sh
|
|
||||||
ut_heredocs.sh
|
|
||||||
ut_pipes.sh
|
|
||||||
ut_redirections.sh
|
|
||||||
ut_to_do_manually.sh
|
|
||||||
ut_vrac.sh
|
|
||||||
wip
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
"exit retour a la ligne"
|
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
minishell
|
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
l^Ds
|
|
||||||
-----------[0m
|
-----------[0m
|
||||||
|
|
||||||
|
|||||||
@@ -2,60 +2,9 @@
|
|||||||
[1;33m
|
[1;33m
|
||||||
|
|
||||||
|
|
||||||
file: ut_vrac.sh
|
file: ut_heredocs.sh
|
||||||
[0m[1;37m
|
[0m[1;37m
|
||||||
|
|
||||||
$
|
COMMANDE=' echo "hugo"'
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
file_name_in_current_dir
|
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
/bin/echo bonjour
|
|
||||||
-----------[0m
|
|
||||||
bonjour
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
not_cmd
|
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
echo bonjour > $test w/ t
|
|
||||||
ls
|
|
||||||
rm '$test'
|
|
||||||
-----------[0m
|
|
||||||
logs
|
|
||||||
minishell
|
|
||||||
$test
|
|
||||||
tests_discord.md
|
|
||||||
unitests.sh
|
|
||||||
ut_bonus.sh
|
|
||||||
ut_builtins.sh
|
|
||||||
ut_exit_status.sh
|
|
||||||
ut_expensions.sh
|
|
||||||
ut_heredocs.sh
|
|
||||||
ut_pipes.sh
|
|
||||||
ut_redirections.sh
|
|
||||||
ut_to_do_manually.sh
|
|
||||||
ut_vrac.sh
|
|
||||||
wip
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
"exit retour a la ligne"
|
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
minishell
|
|
||||||
-----------[0m
|
|
||||||
|
|
||||||
[1;37m
|
|
||||||
|
|
||||||
l^Ds
|
|
||||||
-----------[0m
|
-----------[0m
|
||||||
|
|
||||||
|
|||||||
@@ -87,8 +87,8 @@
|
|||||||
echo ""
|
echo ""
|
||||||
}
|
}
|
||||||
|
|
||||||
# check for argments, like options or files list
|
# check for arguments, like options or files list
|
||||||
# if no file list, default file list is used
|
# if no file in arguments, default file list is used
|
||||||
list_files="$default_files"
|
list_files="$default_files"
|
||||||
if [ $# -gt 0 ]
|
if [ $# -gt 0 ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
COMMANDE=' echo "hugo"'
|
COMMANDE=' echo "hugo"
|
||||||
# cat << EOF
|
cat << EOF
|
||||||
# hello you
|
hello you
|
||||||
# EOF'
|
EOF'
|
||||||
|
|
||||||
#echo "$COMMANDE" | bash -i &>file.log
|
echo "$COMMANDE" | bash -i &>file.log
|
||||||
#echo "$COMMANDE" | ./minishell &>file.log
|
#echo "$COMMANDE" | ./minishell &>file.log
|
||||||
|
|
||||||
#cat << EOF
|
#cat << EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user