cmd: Avoid excess newline after TYPE outputs file contents.
This commit is contained in:
parent
f43297f989
commit
4b4dd300f6
|
@ -2532,8 +2532,6 @@ void WCMD_type (WCHAR *command) {
|
||||||
WCMD_output_asis (buffer);
|
WCMD_output_asis (buffer);
|
||||||
}
|
}
|
||||||
CloseHandle (h);
|
CloseHandle (h);
|
||||||
if (!writeHeaders)
|
|
||||||
WCMD_output_asis (newline);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,6 +58,16 @@ echo P%ERRORLEVEL%
|
||||||
echo %ERRORLEVEL%S
|
echo %ERRORLEVEL%S
|
||||||
echo P%ERRORLEVEL%S
|
echo P%ERRORLEVEL%S
|
||||||
|
|
||||||
|
echo ------------ Testing type ------------
|
||||||
|
echo bar> foobaz
|
||||||
|
@echo on
|
||||||
|
type foobaz
|
||||||
|
echo ***
|
||||||
|
@echo off
|
||||||
|
type foobaz
|
||||||
|
echo ***
|
||||||
|
del foobaz
|
||||||
|
|
||||||
echo ------------ Testing if/else --------------
|
echo ------------ Testing if/else --------------
|
||||||
echo if/else should work with blocks
|
echo if/else should work with blocks
|
||||||
if 0 == 0 (
|
if 0 == 0 (
|
||||||
|
|
|
@ -70,6 +70,15 @@ ERRORLEVEL
|
||||||
P0
|
P0
|
||||||
0S
|
0S
|
||||||
P0S
|
P0S
|
||||||
|
------------ Testing type ------------
|
||||||
|
|
||||||
|
@pwd@>type foobaz@space@
|
||||||
|
bar
|
||||||
|
|
||||||
|
@pwd@>echo ***@space@
|
||||||
|
***
|
||||||
|
bar
|
||||||
|
***
|
||||||
------------ Testing if/else --------------
|
------------ Testing if/else --------------
|
||||||
if/else should work with blocks
|
if/else should work with blocks
|
||||||
if seems to work
|
if seems to work
|
||||||
|
|
Loading…
Reference in New Issue