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:
parent
7135ca50c1
commit
0e50eefbd5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=293371
@ -48,6 +48,7 @@ FILES+= cd5.0
|
|||||||
FILES+= cd6.0
|
FILES+= cd6.0
|
||||||
FILES+= cd7.0
|
FILES+= cd7.0
|
||||||
FILES+= cd8.0
|
FILES+= cd8.0
|
||||||
|
FILES+= cd9.0 cd9.0.stdout
|
||||||
FILES+= command1.0
|
FILES+= command1.0
|
||||||
FILES+= command2.0
|
FILES+= command2.0
|
||||||
FILES+= command3.0
|
FILES+= command3.0
|
||||||
|
8
bin/sh/tests/builtins/cd9.0
Normal file
8
bin/sh/tests/builtins/cd9.0
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# $FreeBSD$
|
||||||
|
|
||||||
|
cd /dev
|
||||||
|
cd /bin
|
||||||
|
cd - >/dev/null
|
||||||
|
pwd
|
||||||
|
cd - >/dev/null
|
||||||
|
pwd
|
2
bin/sh/tests/builtins/cd9.0.stdout
Normal file
2
bin/sh/tests/builtins/cd9.0.stdout
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/dev
|
||||||
|
/bin
|
Loading…
Reference in New Issue
Block a user