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 # builtins env
1. `export` sans argument agit differemment 1. `export ""` ! segfault !
from man : "if no names are supplied [...] a list of exported names is displayed."
2. `export ""` ! segfault !
3. `export/unset PATH` agit differemment
# -------------------------------- # --------------------------------
# expansions var # expansions var
1. `echo $"USER"` quotes inside $ 1. `echo $"USER"` quotes inside $
2. `$number` doesn't expand in minishell

View File

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

View File

@@ -1,29 +1,11 @@
# ERROR : # 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 : # OK :
echo $
echo $+
mkdir directory1 mkdir directory1
export POEP=directory1 export POEP=directory1
cd $POEP $MEERPOEP .. cd $POEP $MEERPOEP ..

View File

@@ -9,6 +9,7 @@ echo $?
cat Makefile | grep pr | head -n 5 | hello (NA) cat Makefile | grep pr | head -n 5 | hello (NA)
echo $? echo $?
#--------------------------------------------- #---------------------------------------------
# Race condition, unpredictable behaviour # Race condition, unpredictable behaviour
echo DOET HET NIET > test1 | cat test1 echo DOET HET NIET > test1 | cat test1
@@ -34,7 +35,6 @@ echo coucou | ;
echo ;; echo ;;
#---------------------------------------------- #----------------------------------------------
# Export builtins # Export builtins
@@ -44,10 +44,55 @@ export | grep -e "PWD="
export a="\\" export a="\\"
export
# var without export # var without export
POEP=directory1 POEP=directory1
MEERPOEP=directory2 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 # ' " single quotes
@@ -88,8 +133,9 @@ echo $USER'
echo $' echo $'
echo $"USERhallo" echo $' ' '
echo $"USERhallo"