[7/8] cmd: Misc tab fixes
Frédéric Delanoy
frederic.delanoy at gmail.com
Tue Aug 23 15:54:55 CDT 2011
---
programs/cmd/builtins.c | 7 ++++---
programs/cmd/tests/test_builtins.cmd | 6 ++++++
programs/cmd/tests/test_builtins.cmd.exp | 1 +
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 2c19877..923531f 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -2106,7 +2106,8 @@ void WCMD_setshow_default (const WCHAR *command) {
NORM_IGNORECASE | SORT_STRINGSORT,
command, 2, parmD, -1) == CSTR_EQUAL) {
command += 2;
- while (*command && *command==' ') command++;
+ while (*command && (*command==' ' || *command=='\t'))
+ command++;
}
GetCurrentDirectoryW(sizeof(cwd)/sizeof(WCHAR), cwd);
@@ -2317,7 +2318,7 @@ void WCMD_setshow_env (WCHAR *s) {
DWORD count;
s += 2;
- while (*s && *s==' ') s++;
+ while (*s && (*s==' ' || *s=='\t')) s++;
if (*s=='\"')
WCMD_opt_s_strip_quotes(s);
@@ -2414,7 +2415,7 @@ void WCMD_setshow_prompt (void) {
}
else {
s = param1;
- while ((*s == '=') || (*s == ' ')) s++;
+ while ((*s == '=') || (*s == ' ') || (*s == '\t')) s++;
if (strlenW(s) == 0) {
SetEnvironmentVariableW(promptW, NULL);
}
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index cc083d2..6cd8a48 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -325,6 +325,11 @@ cd
cd ..\..
cd
rd /Q/s foobar
+mkdir foobar
+cd /d at tab@foobar
+cd
+cd ..
+rd /q/s foobar
echo ------------ Testing type ------------
echo bar> foobaz
@@ -465,6 +470,7 @@ rd /s/Q foobar
echo ...for /L
rem Some cases loop forever writing 0s, like e.g. (1,0,1), (1,a,3) or (a,b,c); those can't be tested here
for /L %%i in (1,2,0) do echo %%i
+for at tab@/L %%i in (1,2,0) do echo %%i
for /L %%i in (1,2,6) do echo %%i
for /l %%i in (1 ,2,6) do echo %%i
for /L %%i in (a,2,3) do echo %%i
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 535ef44..e6bf421 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -247,6 +247,7 @@ Current dir: @pwd@\foobar at or_broken@Current dir:@space@
@pwd@\foobar\bar bak
@pwd@\foobar\bar bak
@pwd@
+ at pwd@\foobar
------------ Testing type ------------
@pwd@>type foobaz at space@
--
1.7.6
More information about the wine-patches
mailing list