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
8110dde8
Commit
8110dde8
authored
Feb 17, 2010
by
Dan Kegel
Committed by
Alexandre Julliard
Feb 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix 'else', with tests.
parent
12feffe4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
builtins.c
programs/cmd/builtins.c
+1
-1
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+13
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+4
-0
No files found.
programs/cmd/builtins.c
View file @
8110dde8
...
...
@@ -1072,7 +1072,7 @@ void WCMD_part_execute(CMD_LIST **cmdList, WCHAR *firstcmd, WCHAR *variable,
/* Execute any statements appended to the line */
/* FIXME: Only if previous call worked for && or failed for || */
if
((
*
cmdList
)
->
prevDelim
==
CMD_ONFAILURE
||
(
*
cmdList
)
->
prevDelim
!
=
CMD_ONSUCCESS
)
{
(
*
cmdList
)
->
prevDelim
=
=
CMD_ONSUCCESS
)
{
if
(
processThese
&&
(
*
cmdList
)
->
command
)
{
WCMD_execute
((
*
cmdList
)
->
command
,
(
*
cmdList
)
->
redirects
,
variable
,
value
,
cmdList
);
...
...
programs/cmd/tests/test_builtins.cmd
View file @
8110dde8
...
...
@@ -23,3 +23,16 @@ cd dummydir
echo %~dp0
cd ..
rmdir dummydir
echo ------------ Testing if/else --------------
echo if/else should work with blocks
if 0 == 0 (
echo if seems to work
) else (
echo if seems to be broken
)
if 1 == 0 (
echo else seems to be broken
) else (
echo else seems to work
)
programs/cmd/tests/test_builtins.cmd.exp
View file @
8110dde8
...
...
@@ -16,3 +16,7 @@ bar
~dp0 should be directory containing batch file
@pwd@\
@pwd@\
------------ Testing if/else --------------
if/else should work with blocks
if seems to work
else 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