mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Add regression test (re: e5e1d4b5
)
This commit is contained in:
parent
e5e1d4b53e
commit
07eb2040e8
1 changed files with 7 additions and 0 deletions
|
@ -1364,5 +1364,12 @@ EOF
|
|||
. $tmp/foo.sh > /dev/null
|
||||
[[ ${.sh.file} == $0 ]] || err_exit "\${.sh.file} is not set to the correct value after sourcing a file"
|
||||
|
||||
# ======
|
||||
# SHLVL should be decreased before exec'ing a program
|
||||
exp=$((SHLVL+1))$'\n'$((SHLVL+2))$'\n'$((SHLVL+1))
|
||||
got=$("$SHELL" -c 'echo $SHLVL; "$SHELL" -c "echo \$SHLVL"; exec "$SHELL" -c "echo \$SHLVL"')
|
||||
[[ $got == "$exp" ]] || err_exit "SHLVL not increased correctly" \
|
||||
"(expected $(printf %q "$exp"), got $(printf %q "$got"))"
|
||||
|
||||
# ======
|
||||
exit $((Errors<125?Errors:125))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue