sh: Add a test for 'cd -'.

Redirect 'cd -' output to /dev/null since POSIX requires it to write the new
directory name even if not interactive, but we currently only write it if
interactive.
This commit is contained in:
Jilles Tjoelker 2016-01-07 21:46:07 +00:00
parent 7135ca50c1
commit 0e50eefbd5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293371
3 changed files with 11 additions and 0 deletions

View File

@ -48,6 +48,7 @@ FILES+= cd5.0
FILES+= cd6.0
FILES+= cd7.0
FILES+= cd8.0
FILES+= cd9.0 cd9.0.stdout
FILES+= command1.0
FILES+= command2.0
FILES+= command3.0

View File

@ -0,0 +1,8 @@
# $FreeBSD$
cd /dev
cd /bin
cd - >/dev/null
pwd
cd - >/dev/null
pwd

View File

@ -0,0 +1,2 @@
/dev
/bin