cmd/tests: Add tests for FOR /F 'delims' option.

This commit is contained in:
Frédéric Delanoy 2011-08-25 23:08:34 +02:00 committed by Alexandre Julliard
parent 1755885472
commit fef13bf2ca
2 changed files with 16 additions and 0 deletions

View File

@ -639,6 +639,14 @@ for /f "eol=@" %%i in ("@y") do echo %%i > output_file
if not exist output_file (echo no output) else (del output_file)
for /f "eol==" %%i in ("=y") do echo %%i > output_file
if not exist output_file (echo no output) else (del output_file)
echo ......delims option
for /f "delims=|" %%i in ("a|d") do echo %%i
for /f "delims=|" %%i in ("a |d") do echo %%i
for /f "delims=|" %%i in ("a d|") do echo %%i
for /f "delims=| " %%i in ("a d|") do echo %%i
for /f "delims==" %%i in ("C r=d|") do echo %%i
for /f "delims=" %%i in ("foo bar baz") do echo %%i
for /f "delims=" %%i in ("c:\foo bar baz\..") do echo %%~fi
cd ..
rd /s/q foobar

View File

@ -467,6 +467,14 @@ c
@todo_wine@a|d
@todo_wine@no output
@todo_wine@no output
......delims option
@todo_wine@a
@todo_wine@a@space@
@todo_wine@a d
@todo_wine@a
@todo_wine@C r
@todo_wine@foo bar baz
@todo_wine@c:\
-----------Testing del /a-----------
not-r.test not found after delete, good
r.test found before delete, good