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

tests/leaks.sh: test unalias (re: 5d50f825)

This commit is contained in:
Martijn Dekker 2020-09-18 16:51:57 +02:00
parent 7303824789
commit 69679be8d7

View file

@ -246,5 +246,16 @@ done
after=$(getmem)
err_exit_if_leak 'typeset in function called by command substitution'
# ======
# Check that unsetting an alias frees both the node and its value
before=$(getmem)
for ((i=0; i < N; i++))
do alias "test$i=command$i"
unalias "test$i"
done
after=$(getmem)
err_exit_if_leak 'unalias'
# ======
exit $((Errors<125?Errors:125))