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
d7edf3e6
Commit
d7edf3e6
authored
Feb 09, 2024
by
Bernhard Übelacker
Committed by
Alexandre Julliard
Feb 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Handle lines with just spaces in bracket blocks.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51599
parent
1d479df4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+26
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+6
-0
wcmdmain.c
programs/cmd/wcmdmain.c
+1
-0
No files found.
programs/cmd/tests/test_builtins.cmd
View file @
d7edf3e6
...
...
@@ -1029,6 +1029,32 @@ if not exist %windir% (
) else (
echo windir does exist
)
if 1 == 0 (
echo 1 == 0 should not be true
@space@
) else echo block containing a line with just space seems to work
if 1 == 0 (
echo 1 == 0 should not be true
@tab@
) else echo block containing a line with just tab seems to work
if 1 == 0 (
echo 1 == 0 should not be true
@space@@tab@
) else echo block containing a line with just space and tab seems to work
if 1 == 0 (
echo 1 == 0 should not be true
@tab@@space@
) else echo block containing a line with just tab and space seems to work
if 1 == 0 (
echo 1 == 0 should not be true
@space@
@space@
) else echo block containing two lines with just space seems to work
if 1 == 0 (
echo 1 == 0 should not be true
@tab@
@tab@
) else echo block containing two lines with just tab seems to work
echo --- case sensitivity with and without /i option
if bar==BAR echo if does not default to case sensitivity
if not bar==BAR echo if seems to default to case sensitivity
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
d7edf3e6
...
...
@@ -707,6 +707,12 @@ comparison operators surrounded by brackets seem to work
comparison operators surrounded by brackets seem to work
windir is defined
windir does exist
block containing a line with just space seems to work
block containing a line with just tab seems to work
block containing a line with just space and tab seems to work
block containing a line with just tab and space seems to work
block containing two lines with just space seems to work
block containing two lines with just tab seems to work
--- case sensitivity with and without /i option
if seems to default to case sensitivity
if /i seems to work
...
...
programs/cmd/wcmdmain.c
View file @
d7edf3e6
...
...
@@ -2326,6 +2326,7 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
}
else
break
;
}
extraData
=
WCMD_skip_leading_spaces
(
extraData
);
}
while
(
*
extraData
==
0x00
);
curPos
=
extraSpace
;
...
...
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