small adjust to tests
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
cd $(dirname $0)
|
||||
|
||||
MINISHELL="../minishell"
|
||||
|
||||
# COLORS
|
||||
RED="\e[0;31m"
|
||||
GREEN="\e[0;32m"
|
||||
@@ -21,7 +23,7 @@ cd $(dirname $0)
|
||||
ENDCO="\e[0m"
|
||||
|
||||
# copy the executable to current directory
|
||||
cp ../../minishell .
|
||||
cp $MINISHELL .
|
||||
|
||||
# globale variables
|
||||
UNIT_TEST=0
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
#
|
||||
# ENV
|
||||
#
|
||||
|
||||
env
|
||||
|
||||
#
|
||||
# EXPORT
|
||||
#
|
||||
@@ -22,34 +16,6 @@ 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
|
||||
#
|
||||
|
||||
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 $?
|
||||
|
||||
cat Makefile | grep pr | head -n 5 | cd test (mybin)
|
||||
$?
|
||||
echo $?
|
||||
|
||||
cat Makefile | grep pr | head -n 5 | cat test (bin)
|
||||
$?
|
||||
echo $?
|
||||
|
||||
cat Makefile | grep pr | head -n 5 | hello (NA)
|
||||
$?
|
||||
echo $?
|
||||
|
||||
cat diufosgid
|
||||
$?
|
||||
echo $?
|
||||
|
||||
exit
|
||||
$?
|
||||
echo $?
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ rm output
|
||||
|
||||
rm output
|
||||
|
||||
sleep 5 | exit
|
||||
sleep 1 | exit
|
||||
|
||||
ls | cat
|
||||
|
||||
|
||||
Reference in New Issue
Block a user