diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index ffbc81469fa..c640ec4c3fe 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -244,6 +244,38 @@ if exist bar6 ( del bar6 ) +echo ------------ Testing cd ------------ +mkdir foobar +cd foobar +echo blabla > singleFile +dir /b +echo Current dir: %CD% +cd +cd .. +cd +cd foobar@space@ +cd +cd .. +cd +cd @space@foobar +cd +cd.. +cd +cd foobar +cd..@space@ +cd +if not exist foobar (cd ..) +cd foobar +mkdir "bar bak" +cd "bar bak" +cd +cd .. +cd bar bak +cd +cd ..\.. +cd +rd /Q/s foobar + echo ------------ Testing type ------------ echo bar> foobaz @echo on diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 2954e166bc6..15806378b48 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -179,6 +179,19 @@ foo4 @todo_wine@...on failure conditional || @todo_wine@foo5 @todo_wine@foo6@space@ +------------ Testing cd ------------ +singleFile +Current dir: @pwd@\foobar@or_broken@Current dir:@space@ +@pwd@\foobar +@pwd@ +@pwd@\foobar +@pwd@ +@pwd@\foobar +@pwd@ +@todo_wine@@pwd@ +@pwd@\foobar\bar bak +@pwd@\foobar\bar bak +@pwd@ ------------ Testing type ------------ @pwd@>type foobaz@space@