cmd/tests: Add tests for FOR /F 'skip' option.
This commit is contained in:
parent
fef13bf2ca
commit
92356ca2b7
|
@ -647,6 +647,15 @@ 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
|
||||
echo ......skip option
|
||||
echo a > foo
|
||||
echo b >> foo
|
||||
echo c >> foo
|
||||
for /f "skip=2" %%i in (foo) do echo %%i
|
||||
for /f "skip=3" %%i in (foo) do echo %%i > output_file
|
||||
if not exist output_file (echo no output) else (del output_file)
|
||||
for /f "skip=4" %%i in (foo) do echo %%i > output_file
|
||||
if not exist output_file (echo no output) else (del output_file)
|
||||
cd ..
|
||||
rd /s/q foobar
|
||||
|
||||
|
|
|
@ -475,6 +475,10 @@ c
|
|||
@todo_wine@C r
|
||||
@todo_wine@foo bar baz
|
||||
@todo_wine@c:\
|
||||
......skip option
|
||||
@todo_wine@c
|
||||
@todo_wine@no output
|
||||
@todo_wine@no output
|
||||
-----------Testing del /a-----------
|
||||
not-r.test not found after delete, good
|
||||
r.test found before delete, good
|
||||
|
|
Loading…
Reference in New Issue