Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bf0e1c7c
Commit
bf0e1c7c
authored
Aug 25, 2011
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Aug 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Add basic FOR /F tests.
parent
199f788c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
0 deletions
+78
-0
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+48
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+30
-0
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
bf0e1c7c
...
...
@@ -585,6 +585,54 @@ set /a var=foo=19, foo %%= 4 + (bar %%= 7) & echo.
set foo=
set bar=
set var=
echo ...for /F
mkdir foobar & cd foobar
echo ......string argument
for /F %%i in ("a b c") do echo %%i
for /f %%i in ("a ") do echo %%i
for /f %%i in ("a") do echo %%i
fOr /f %%i in (" a") do echo %%i
for /f %%i in (" a ") do echo %%i
echo ......fileset argument
echo .........basic blank handling
echo a b c>foo
for /f %%i in (foo) do echo %%i
echo a >foo
for /f %%i in (foo) do echo %%i
echo a>foo
for /f %%i in (foo) do echo %%i
echo a>foo
for /f %%i in (foo) do echo %%i
echo a >foo
for /f %%i in (foo) do echo %%i
echo. > foo
for /f %%i in (foo) do echo %%i
echo. >> foo
echo b > foo
for /f %%i in (foo) do echo %%i
echo .........multi-line with empty lines
echo a Z f> foo
echo. >> foo
echo.>> foo
echo b bC>> foo
echo c>> foo
echo. >> foo
for /f %%b in (foo) do echo %%b
echo .........multiple files
echo q w > bar
echo.>> bar
echo kkk>>bar
for /f %%k in (foo bar) do echo %%k
for /f %%k in (bar foo) do echo %%k
rem echo ......command argument
rem Not implemented on NT4
rem FIXME: Not testable right now in wine: not implemented and would need
rem preliminary grep-like program implementation (e.g. like findstr or fc) even
rem for a simple todo_wine test
rem (for /f "usebackq" %%i in (`echo z a b`) do echo %%i) || echo not supported
rem (for /f usebackq %%i in (`echo z a b`) do echo %%i) || echo not supported
cd ..
rd /s/q foobar
echo -----------Testing del /a-----------
del /f/q *.test > nul
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
bf0e1c7c
...
...
@@ -431,6 +431,36 @@ bar
0
@todo_wine@5@or_broken@0
...for /F
......string argument
a
a
a
a
a
......fileset argument
.........basic blank handling
a
a
a
a
a
b
.........multi-line with empty lines
a
b
c
.........multiple files
a
b
c
q
kkk
q
kkk
a
b
c
-----------Testing del /a-----------
not-r.test not found after delete, good
r.test found before delete, good
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment