summaryrefslogtreecommitdiffhomepage
path: root/tests/zash/subshell-cd.sh
blob: 7bc7a04e453fb15f916ea53841cdf987d56975d0 (plain)
1
2
3
4
5
6
# ( cd dir ) must restore the working directory and PWD.
dir=$PWD
( cd / )
test "$PWD" = "$dir" || { echo "PWD not restored"; exit 1; }
test "$(pwd)" = "$dir" || { echo "cwd not restored"; exit 1; }
echo ok