diff --git a/error.md b/error.md index 88534f7..e489db7 100644 --- a/error.md +++ b/error.md @@ -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 diff --git a/tests/defaults/builtins_env.sh b/tests/defaults/builtins_env.sh index 199b925..62a41c5 100644 --- a/tests/defaults/builtins_env.sh +++ b/tests/defaults/builtins_env.sh @@ -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 diff --git a/tests/defaults/expansions_var.sh b/tests/defaults/expansions_var.sh index 59a07ac..0c92df1 100644 --- a/tests/defaults/expansions_var.sh +++ b/tests/defaults/expansions_var.sh @@ -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 .. diff --git a/tests/false_positive.sh b/tests/false_positive.sh index 5c09a51..0ef5197 100644 --- a/tests/false_positive.sh +++ b/tests/false_positive.sh @@ -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"