cmd: Fix "PATH=value" command.

This commit is contained in:
Jason Edmeades 2012-09-04 00:30:17 +01:00 committed by Alexandre Julliard
parent 682b276ac5
commit 4f71f4af59
3 changed files with 16 additions and 1 deletions

View file

@ -2371,7 +2371,7 @@ void WCMD_setshow_path (const WCHAR *command) {
static const WCHAR pathW[] = {'P','A','T','H','\0'};
static const WCHAR pathEqW[] = {'P','A','T','H','=','\0'};
if (strlenW(param1) == 0) {
if (strlenW(param1) == 0 && strlenW(param2) == 0) {
status = GetEnvironmentVariableW(pathW, string, sizeof(string)/sizeof(WCHAR));
if (status != 0) {
WCMD_output_asis ( pathEqW);

View file

@ -1530,6 +1530,17 @@ if d==d goto dest4
:dest4@space@
echo goto with a following space worked
echo ------------ Testing PATH ------------
set backup_path=%path%
set path=original
path
path try2
path
path=try3
path
set path=%backup_path%
set backup_path=
echo ------------ Testing combined CALLs/GOTOs ------------
echo @echo off>foo.cmd
echo goto :eof>>foot.cmd

View file

@ -825,6 +825,10 @@ goto with no leading space worked
goto with a leading space worked
goto with a leading tab worked
goto with a following space worked
------------ Testing PATH ------------
PATH=original
PATH=try2
PATH=try3
------------ Testing combined CALLs/GOTOs ------------
world
cheball