small adjust to tests
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
|
MINISHELL="../minishell"
|
||||||
|
|
||||||
# COLORS
|
# COLORS
|
||||||
RED="\e[0;31m"
|
RED="\e[0;31m"
|
||||||
GREEN="\e[0;32m"
|
GREEN="\e[0;32m"
|
||||||
@@ -21,7 +23,7 @@ cd $(dirname $0)
|
|||||||
ENDCO="\e[0m"
|
ENDCO="\e[0m"
|
||||||
|
|
||||||
# copy the executable to current directory
|
# copy the executable to current directory
|
||||||
cp ../../minishell .
|
cp $MINISHELL .
|
||||||
|
|
||||||
# globale variables
|
# globale variables
|
||||||
UNIT_TEST=0
|
UNIT_TEST=0
|
||||||
|
|||||||
@@ -1,9 +1,3 @@
|
|||||||
#
|
|
||||||
# ENV
|
|
||||||
#
|
|
||||||
|
|
||||||
env
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# EXPORT
|
# EXPORT
|
||||||
#
|
#
|
||||||
@@ -22,34 +16,6 @@ export "HI= hi"
|
|||||||
|
|
||||||
export "HI =hi"
|
export "HI =hi"
|
||||||
|
|
||||||
export
|
|
||||||
env
|
|
||||||
# display is different for both commands
|
|
||||||
|
|
||||||
env
|
|
||||||
export
|
|
||||||
env
|
|
||||||
|
|
||||||
#
|
|
||||||
# UNSET
|
|
||||||
#
|
|
||||||
|
|
||||||
export BLOU=
|
|
||||||
env
|
|
||||||
unset BLOU
|
|
||||||
env
|
|
||||||
|
|
||||||
unset LOL ROR
|
|
||||||
env
|
|
||||||
|
|
||||||
unset blablabla
|
|
||||||
env
|
|
||||||
|
|
||||||
export ""
|
|
||||||
env
|
|
||||||
unset ""
|
|
||||||
env
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# ECHO
|
# ECHO
|
||||||
#
|
#
|
||||||
|
|||||||
33
ut_builtins_env.sh
Normal file
33
ut_builtins_env.sh
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#
|
||||||
|
# ENV
|
||||||
|
#
|
||||||
|
|
||||||
|
env
|
||||||
|
|
||||||
|
export
|
||||||
|
env
|
||||||
|
# display is different for both commands
|
||||||
|
|
||||||
|
env
|
||||||
|
export
|
||||||
|
env
|
||||||
|
|
||||||
|
#
|
||||||
|
# UNSET
|
||||||
|
#
|
||||||
|
|
||||||
|
export BLOU=
|
||||||
|
env
|
||||||
|
unset BLOU
|
||||||
|
env
|
||||||
|
|
||||||
|
unset LOL ROR
|
||||||
|
env
|
||||||
|
|
||||||
|
unset blablabla
|
||||||
|
env
|
||||||
|
|
||||||
|
export ""
|
||||||
|
env
|
||||||
|
unset ""
|
||||||
|
env
|
||||||
@@ -1,17 +1,17 @@
|
|||||||
echo $?
|
echo $?
|
||||||
|
|
||||||
cat Makefile | grep pr | head -n 5 | cd test (mybin)
|
cat Makefile | grep pr | head -n 5 | cd test (mybin)
|
||||||
$?
|
echo $?
|
||||||
|
|
||||||
cat Makefile | grep pr | head -n 5 | cat test (bin)
|
cat Makefile | grep pr | head -n 5 | cat test (bin)
|
||||||
$?
|
echo $?
|
||||||
|
|
||||||
cat Makefile | grep pr | head -n 5 | hello (NA)
|
cat Makefile | grep pr | head -n 5 | hello (NA)
|
||||||
$?
|
echo $?
|
||||||
|
|
||||||
cat diufosgid
|
cat diufosgid
|
||||||
$?
|
echo $?
|
||||||
|
|
||||||
exit
|
exit
|
||||||
$?
|
echo $?
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ rm output
|
|||||||
|
|
||||||
rm output
|
rm output
|
||||||
|
|
||||||
sleep 5 | exit
|
sleep 1 | exit
|
||||||
|
|
||||||
ls | cat
|
ls | cat
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user