cmd: Add circumflex support into command shell.

This commit is contained in:
Jason Edmeades 2012-09-25 13:45:28 +01:00 committed by Alexandre Julliard
parent e35b239b41
commit d8c0fbcedc
2 changed files with 21 additions and 17 deletions

View File

@ -123,7 +123,7 @@ bar2
'a', '~`+', '.{}!+b'
'a', 'b', ''
'"a;b"', '', ''
@todo_wine@'a', 'b', ''
'a', 'b', ''
'a[b]{c}(d)e', '', ''
'a', '', ''
second line
@ -197,25 +197,25 @@ A
B
C
------------ Testing circumflex escape character ------------
@todo_wine@hello, world
@todo_wine@hello, world
@todo_wine@hell^o, world
@todo_wine@hell^o, world
hello, world
hello, world
hell^o, world
hell^o, world
baz
@todo_wine@baz
@todo_wine@foo | echo bar
@todo_wine@foo & echo bar
@todo_wine@bak &
baz
foo | echo bar
foo & echo bar
bak &
baz@space@
0@or_broken@1
@todo_wine@foo > foo
@todo_wine@<
@todo_wine@ffoof
@todo_wine@FOO=bar | baz
@todo_wine@0
@todo_wine@FOO=bar ^| baz
@todo_wine@bar | baz
@todo_wine@0
foo > foo
<
ffoof
FOO=bar | baz
0
FOO=bar ^| baz
bar | baz
0
------------ Testing 'set' ------------
1
0

View File

@ -2070,6 +2070,10 @@ WCHAR *WCMD_ReadAndParseLine(const WCHAR *optionalcmd, CMD_LIST **output, HANDLE
}
break;
case '^': if (!inQuotes) curPos++;
curCopyTo[(*curLen)++] = *curPos;
break;
case '&': if (!inQuotes) {
lastWasRedirect = FALSE;