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
3cda8704
Commit
3cda8704
authored
Jun 24, 2015
by
Thomas Faller
Committed by
Alexandre Julliard
Jun 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix invalid "else if" execution.
parent
4f3acf31
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
2 deletions
+43
-2
builtins.c
programs/cmd/builtins.c
+1
-1
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+39
-1
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+3
-0
No files found.
programs/cmd/builtins.c
View file @
3cda8704
...
@@ -1561,7 +1561,7 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd,
...
@@ -1561,7 +1561,7 @@ static void WCMD_part_execute(CMD_LIST **cmdList, const WCHAR *firstcmd,
(
*
cmdList
)
->
command
))
{
(
*
cmdList
)
->
command
))
{
/* Swap between if and else processing */
/* Swap between if and else processing */
processThese
=
!
processThese
;
processThese
=
!
executecmds
;
/* Process the ELSE part */
/* Process the ELSE part */
if
(
processThese
)
{
if
(
processThese
)
{
...
...
programs/cmd/tests/test_builtins.cmd
View file @
3cda8704
...
@@ -667,7 +667,45 @@ if /c==/c (
...
@@ -667,7 +667,45 @@ if /c==/c (
) else (
) else (
echo parameter detection seems to be broken
echo parameter detection seems to be broken
)
)
SET elseIF=0
if 1 == 1 (
SET /a elseIF=%elseIF%+1
) else if 1 == 1 (
SET /a elseIF=%elseIF%+2
) else (
SET /a elseIF=%elseIF%+2
)
if %elseIF% == 1 (
echo else if seems to work
) else (
echo else if seems to be broken
)
SET elseIF=0
if 1 == 2 (
SET /a elseIF=%elseIF%+2
) else if 1 == 1 (
SET /a elseIF=%elseIF%+1
) else (
SET /a elseIF=%elseIF%+2
)
if %elseIF% == 1 (
echo else if seems to work
) else (
echo else if seems to be broken
)
SET elseIF=0
if 1 == 2 (
SET /a elseIF=%elseIF%+2
) else if 1 == 2 (
SET /a elseIF=%elseIF%+2
) else (
SET /a elseIF=%elseIF%+1
)
if %elseIF% == 1 (
echo else if seems to work
) else (
echo else if seems to be broken
)
echo --- case sensitivity with and without /i option
echo --- case sensitivity with and without /i option
if bar==BAR echo if does not default to case sensitivity
if bar==BAR echo if does not default to case sensitivity
if not bar==BAR echo if seems to 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 @
3cda8704
...
@@ -438,6 +438,9 @@ Passed: file size check on subdir\a.a [8]@or_broken@Skipping file size check on
...
@@ -438,6 +438,9 @@ Passed: file size check on subdir\a.a [8]@or_broken@Skipping file size check on
if seems to work
if seems to work
else seems to work
else seems to work
if seems not to detect /c as parameter
if seems not to detect /c as parameter
else if seems to work
else if seems to work
else if seems to work
--- case sensitivity with and without /i option
--- case sensitivity with and without /i option
if seems to default to case sensitivity
if seems to default to case sensitivity
if /i seems to work
if /i seems to work
...
...
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