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) {
errorlevel = 1;
} else {
if (writeHeaders) {
static const WCHAR fmt[] = {'\n','%','1','\n','\n','\0'};
WCMD_output(fmt, thisArg);
static const WCHAR fmt[] = {'\n','%','1','\n','\n','\n','\0'};
WCMD_output_stderr(fmt, thisArg);
}
while (WCMD_ReadFile(h, buffer, ARRAY_SIZE(buffer) - 1, &count)) {
if (count == 0) break; /* ReadFile reports success on EOF! */
......
......@@ -875,7 +875,15 @@ type ."\foobaz"
echo ---2
type ".\foobaz"
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 ------------
md foobar & cd foobar
......
......@@ -659,6 +659,20 @@ bar
---2
bar
---3
---4
---5
bar
foo
---6
foobaz
foobay
---7
------------ Testing NUL ------------
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