Frédéric Delanoy : cmd: Fix ECHO tab issues.

Alexandre Julliard julliard at winehq.org
Wed Aug 24 14:05:23 CDT 2011


Module: wine
Branch: master
Commit: 6572de3cfa5099f90bc1f6376f05f60828960711
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6572de3cfa5099f90bc1f6376f05f60828960711

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Tue Aug 23 22:54:49 2011 +0200

cmd: Fix ECHO tab issues.

---

 programs/cmd/builtins.c                  |    2 +-
 programs/cmd/tests/test_builtins.cmd.exp |   16 ++++++++--------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index cc3f5f6..c4ad231 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -864,7 +864,7 @@ void WCMD_echo (const WCHAR *command) {
   int count;
   const WCHAR *origcommand = command;
 
-  if (command[0]==' ' || command[0]=='.' || command[0]==':')
+  if (command[0]==' ' || command[0]=='\t' || command[0]=='.' || command[0]==':')
     command++;
   count = strlenW(command);
   if (count == 0 && origcommand[0]!='.' && origcommand[0]!=':') {
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 18ba102..b86c012 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -52,13 +52,13 @@ word at space@@space@
 word
 
 @pwd@>echo at tab@word at space@
- at todo_wine@word
+word
 
 @pwd@>echo at tab@word at space@@tab@@space@
- at todo_wine@word at space@@tab@
+word at space@@tab@
 
 @pwd@>echo at tab@word at tab@@space@@space@
- at todo_wine@word at tab@@space@
+word at tab@@space@
 
 @todo_wine@@pwd@>echo word at space@
 word
@@ -70,7 +70,7 @@ word
 @space@@tab at word
 
 @pwd@>echo at tab@@tab at word@space@
- at todo_wine@@tab at word
+ at tab@word
 ------------ Testing 'echo' [OFF] --------------
 word
 'singlequotedword'
@@ -88,13 +88,13 @@ word
 word at space@
 word at space@@space@
 word
- at todo_wine@word
- at todo_wine@word at space@@tab@
- at todo_wine@word at tab@@space@
+word
+word at space@@tab@
+word at tab@@space@
 word
 @tab at word
 @space@@tab at word
- at todo_wine@@tab at word
+ at tab@word
 ------------ Testing redirection operators --------------
 ...stdout redirection
 foo




More information about the wine-cvs mailing list