Commit 4684e1a9 authored by Bernhard belacker's avatar Bernhard belacker Committed by Alexandre Julliard

cmd.exe: Command type with multiple files should print filenames to stderr.

parent 57f697e1
...@@ -4561,8 +4561,8 @@ void WCMD_type (WCHAR *args) { ...@@ -4561,8 +4561,8 @@ void WCMD_type (WCHAR *args) {
errorlevel = 1; errorlevel = 1;
} else { } else {
if (writeHeaders) { if (writeHeaders) {
static const WCHAR fmt[] = {'\n','%','1','\n','\n','\0'}; static const WCHAR fmt[] = {'\n','%','1','\n','\n','\n','\0'};
WCMD_output(fmt, thisArg); WCMD_output_stderr(fmt, thisArg);
} }
while (WCMD_ReadFile(h, buffer, ARRAY_SIZE(buffer) - 1, &count)) { while (WCMD_ReadFile(h, buffer, ARRAY_SIZE(buffer) - 1, &count)) {
if (count == 0) break; /* ReadFile reports success on EOF! */ if (count == 0) break; /* ReadFile reports success on EOF! */
......
...@@ -875,7 +875,15 @@ type ."\foobaz" ...@@ -875,7 +875,15 @@ type ."\foobaz"
echo ---2 echo ---2
type ".\foobaz" type ".\foobaz"
echo ---3 echo ---3
del foobaz echo foo> foobay
echo ---4
type foobaz foobay > foobax 2> foobaw
echo ---5
type foobax
echo ---6
type foobaw
echo ---7
del foobaz foobay foobax foobaw
echo ------------ Testing NUL ------------ echo ------------ Testing NUL ------------
md foobar & cd foobar md foobar & cd foobar
......
...@@ -659,6 +659,20 @@ bar ...@@ -659,6 +659,20 @@ bar
---2 ---2
bar bar
---3 ---3
---4
---5
bar
foo
---6
foobaz
foobay
---7
------------ Testing NUL ------------ ------------ Testing NUL ------------
bar bar
bar bar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment