diff --git a/tests/cd.in b/tests/cd.in index d52c2e46d..6ea2c0289 100644 --- a/tests/cd.in +++ b/tests/cd.in @@ -76,6 +76,12 @@ set -g CDPATH ./ cd $base test $PWD = $base; and echo No crash with ./ CDPATH +# test for directories beginning with a hyphen +mkdir $base/-testdir +cd $base +cd -- -testdir +test $PWD = $base/-testdir + # cd back before removing the test directory again. cd $oldpwd rm -Rf $base