cmd: echo.word should echo back the word without the .

This commit is contained in:
Jason Edmeades 2010-09-07 15:59:43 -07:00 committed by Alexandre Julliard
parent 4f210e21a5
commit 32c8b46633
3 changed files with 7 additions and 6 deletions

View File

@ -668,15 +668,12 @@ BOOL WCMD_delete (WCHAR *command, BOOL expectDir) {
void WCMD_echo (const WCHAR *command) { void WCMD_echo (const WCHAR *command) {
int count; int count;
const WCHAR *origcommand = command;
if ((command[0] == '.') && (command[1] == 0)) { if (command[0]==' ' || command[0]=='.')
WCMD_output (newline);
return;
}
if (command[0]==' ')
command++; command++;
count = strlenW(command); count = strlenW(command);
if (count == 0) { if (count == 0 && origcommand[0]!='.') {
if (echo_mode) WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), onW); if (echo_mode) WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), onW);
else WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), offW); else WCMD_output (WCMD_LoadMessage(WCMD_ECHOPROMPT), offW);
return; return;

View File

@ -9,6 +9,8 @@ echo "doublequotedword"
echo "/?" echo "/?"
echo. echo.
echo . echo .
echo.word
echo .word
echo ------------ Testing 'set' -------------- echo ------------ Testing 'set' --------------
echo set "FOO=bar" should not include the quotes in the variable value echo set "FOO=bar" should not include the quotes in the variable value

View File

@ -9,6 +9,8 @@ at-echoed-word
"/?" "/?"
. .
word
.word
------------ Testing 'set' -------------- ------------ Testing 'set' --------------
set "FOO=bar" should not include the quotes in the variable value set "FOO=bar" should not include the quotes in the variable value
bar bar