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
8bbd48bf
Commit
8bbd48bf
authored
May 06, 2024
by
Eric Pouech
Committed by
Alexandre Julliard
May 07, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/tests: Test delayed expansion with spaces in IF and FOR.
Based on a patch by Alex Henrie. Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
232f2825
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+17
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+4
-0
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
8bbd48bf
...
...
@@ -744,6 +744,17 @@ echo '%~xs1'
goto :eof
:endEchoFuns
setlocal EnableDelayedExpansion
set WINE_FOO=foo bar
for %%i in ("!WINE_FOO!") do echo %%i
for %%i in (!WINE_FOO!) do echo %%i
rem tests disabled for now... wine's cmd loops endlessly here
rem set WINE_FOO=4 4 4
rem for /l %%i in (!WINE_FOO!) do echo %%i
rem set WINE_FOO=4
rem for /l %%i in (1 2 !WINE_FOO!) do echo %%i
setlocal DisableDelayedExpansion
echo --- in digit variables
for %%0 in (a b) do echo %%0 %%1 %%2
echo ------------ Testing parameter zero ------------
...
...
@@ -794,6 +805,12 @@ set WINE_FOO=foo
echo %WINE_FOO%
echo !WINE_FOO!
set WINE_FOO=
setlocal EnableDelayedExpansion
set WINE_FOO=foo bar
if !WINE_FOO!=="" (echo empty) else echo not empty
setlocal DisableDelayedExpansion
echo --- using /V cmd flag
echo @echo off> tmp.cmd
echo set WINE_FOO=foo>> tmp.cmd
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
8bbd48bf
...
...
@@ -600,6 +600,9 @@ N
@drive@
''
'.eh'@or_broken@''
"foo bar"
@todo_wine@foo
@todo_wine@bar
--- in digit variables
@todo_wine@a %1 %2
@todo_wine@b %1 %2
...
...
@@ -621,6 +624,7 @@ bar@or_broken@foo
0@or_broken@1
foo
!WINE_FOO!
@todo_wine@not empty
--- using /V cmd flag
foo
foo@or_broken@!WINE_FOO!
...
...
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