1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

tests/attributes.sh: fix spurious fail if any env var contains 'foo'

This commit is contained in:
Martijn Dekker 2021-02-12 12:45:47 +00:00
parent 41ebb55a3a
commit 0f92d63823

View file

@ -248,8 +248,8 @@ function fun
[[ $foo == hello ]] || err_exit 'export scoping problem in function' [[ $foo == hello ]] || err_exit 'export scoping problem in function'
} }
fun fun
[[ $(export | grep foo) == 'foo=hello' ]] || err_exit 'export not working in functions' [[ $'\n'$(export)$'\n' == *$'\nfoo=hello\n'* ]] || err_exit 'export not working in functions'
[[ $(export | grep bar) ]] && err_exit 'typeset -x not local' [[ $'\n'$(export) == *$'\nbar='* ]] && err_exit 'typeset -x not local'
[[ $($SHELL -c 'typeset -r IFS=;print -r $(pwd)' 2> /dev/null) == "$(pwd)" ]] || err_exit 'readonly IFS causes command substitution to fail' [[ $($SHELL -c 'typeset -r IFS=;print -r $(pwd)' 2> /dev/null) == "$(pwd)" ]] || err_exit 'readonly IFS causes command substitution to fail'
fred[66]=88 fred[66]=88
[[ $(typeset -pa) == *fred* ]] || err_exit 'typeset -pa not working' [[ $(typeset -pa) == *fred* ]] || err_exit 'typeset -pa not working'