[PATCH 2/3] [cmd] A successful set should reset the errorlevel
Ann and Jason Edmeades
jason at edmeades.me.uk
Wed Sep 5 18:31:37 CDT 2012
On a successful 'set var=value' command, the error level should
be reset
[No bug - just fix a trivial todo in the tests]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120906/15949fa5/attachment.html>
-------------- next part --------------
From cebaee7b700184978546f1293afa374a1af60b0a Mon Sep 17 00:00:00 2001
From: Jason Edmeades <jason at edmeades.me.uk>
Date: Wed, 5 Sep 2012 23:41:48 +0100
Subject: [PATCH 2/3] [cmd] A successful set should reset the errorlevel
On a successful 'set var=value' command, the error level should
be reset
[No bug - just fix a trivial todo in the tests]
---
programs/cmd/builtins.c | 1 +
programs/cmd/tests/test_builtins.cmd.exp | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index abfac45..270692c 100755
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -2371,6 +2371,7 @@ void WCMD_setshow_env (WCHAR *s) {
if ((!status) & (gle == ERROR_ENVVAR_NOT_FOUND)) {
errorlevel = 1;
} else if ((!status)) WCMD_print_error();
+ else errorlevel = 0;
}
}
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index c120ae7..9578c75 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -201,13 +201,13 @@ baz at space@
@todo_wine at 0
------------ Testing 'set' ------------
1
- at todo_wine@0
+0
FOOBAR not defined
@todo_wine@ baz
FOOBAR = baz
- at todo_wine@0
+0
@todo_wine@ baz2
- at todo_wine@0
+0
bar
@todo_wine at FOOBAR= bar
@todo_wine at FOOBAR = baz2
--
1.7.5.4
More information about the wine-patches
mailing list