Module: wine Branch: master Commit: 4b4dd300f6832be491610943b01b80118f978c27 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4b4dd300f6832be491610943b0...
Author: Frédéric Delanoy frederic.delanoy@gmail.com Date: Thu Jul 14 20:07:14 2011 +0200
cmd: Avoid excess newline after TYPE outputs file contents.
---
programs/cmd/builtins.c | 2 -- programs/cmd/tests/test_builtins.cmd | 10 ++++++++++ programs/cmd/tests/test_builtins.cmd.exp | 9 +++++++++ 3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 0352e59..86fd54c 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -2532,8 +2532,6 @@ void WCMD_type (WCHAR *command) { WCMD_output_asis (buffer); } CloseHandle (h); - if (!writeHeaders) - WCMD_output_asis (newline); } } } diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd index 3011e4d..bcff6e8 100644 --- a/programs/cmd/tests/test_builtins.cmd +++ b/programs/cmd/tests/test_builtins.cmd @@ -58,6 +58,16 @@ echo P%ERRORLEVEL% echo %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 if/else should work with blocks if 0 == 0 ( diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp index 229adc4..eb55151 100644 --- a/programs/cmd/tests/test_builtins.cmd.exp +++ b/programs/cmd/tests/test_builtins.cmd.exp @@ -70,6 +70,15 @@ ERRORLEVEL P0 0S P0S +------------ Testing type ------------ + +@pwd@>type foobaz@space@ +bar + +@pwd@>echo ***@space@ +*** +bar +*** ------------ Testing if/else -------------- if/else should work with blocks if seems to work