deplacement de tests env et expensions var dans false positive

This commit is contained in:
hugogogo
2021-12-18 13:53:27 +01:00
parent 918efaf73c
commit 4cc4f8d243
4 changed files with 56 additions and 46 deletions

View File

@@ -28,16 +28,12 @@
# --------------------------------
# builtins env
1. `export` sans argument agit differemment
from man : "if no names are supplied [...] a list of exported names is displayed."
2. `export ""` ! segfault !
3. `export/unset PATH` agit differemment
1. `export ""` ! segfault !
# --------------------------------
# expansions var
1. `echo $"USER"` quotes inside $
2. `$number` doesn't expand in minishell

View File

@@ -1,10 +1,5 @@
env
#export
env
env
#export
env
export BLOU=
@@ -32,28 +27,19 @@ export "HI= hi"
export "HI =hi"
env
#export
export b='\\'
export c="\b"
#export
env
export a=hijdoehet
#export
env
export test=working
#export
env
export test1
env
#export
env
export test1=
env
@@ -76,7 +62,6 @@ env
echo
export test1
#export
echo
env
@@ -104,7 +89,7 @@ wc
awk
export PATH="test:working:multiplepath:directory1:directory2"
env
/usr/bin/env
export ZZZ
env
@@ -156,7 +141,8 @@ export TEST2=test2
unset TEST1 TEST2
env
#export ""
export ""
env
unset ""
env

View File

@@ -1,29 +1,11 @@
# ERROR :
# quotes inside $
echo $"USER"
echo $"etet"
echo $"hallo"
echo /$"123$USER"
echo hallo$"USER"
echo hallo$"POEP"
echo hallo$'USER'
# "$number"
echo "$222"
echo "hallo$USER***$USER$2$"
echo "$53535"
# OK :
echo $
echo $+
mkdir directory1
export POEP=directory1
cd $POEP $MEERPOEP ..

View File

@@ -9,6 +9,7 @@ echo $?
cat Makefile | grep pr | head -n 5 | hello (NA)
echo $?
#---------------------------------------------
# Race condition, unpredictable behaviour
echo DOET HET NIET > test1 | cat test1
@@ -34,7 +35,6 @@ echo coucou | ;
echo ;;
#----------------------------------------------
# Export builtins
@@ -44,10 +44,55 @@ export | grep -e "PWD="
export a="\\"
export
# var without export
POEP=directory1
MEERPOEP=directory2
export PATH="test:working:multiplepath:directory1:directory2"
env
#----------------------------------------------
# special characters
echo "$222"
echo "hallo$USER***$USER$2$"
echo "$53535"
echo $53535
echo "$5fsdlfjlfj"
echo $1
#----------------------------------------------
# expansions with quotes $""
echo $"USER"
echo $"etet"
echo $"hallo"
echo /$"123$USER"
echo hallo$"USER"
echo hallo$"POEP"
echo hallo$'USER'
echo $""
echo $"nothing"
echo $"$USER"
#----------------------------------------------
# ' " single quotes
@@ -88,8 +133,9 @@ echo $USER'
echo $'
echo $"USERhallo"
echo $' ' '
echo $"USERhallo"