These changes fix two TYPE issues:
- TYPE output should terminate at a Ctrl-Z EOF character, if output is not redirected. - TYPE redirection should function as a rudimentary file copy (bug #56381).
Tests run: TYPE text_file_containing_embedded_ctrl_z.txt (Output terminates at Ctrl-Z character.)
TYPE c:\windows\winhelp.exe >foo (Issue raised in bug #56381. Foo is identical copy of winhelp.exe and not truncated at first NUL character. Test for this case was added to the automated tests.)
CHCP 65001 TYPE text_file_containing_unicode_characters.txt (Unicode characters were output to the console.)
-- v2: cmd/tests: Add test for TYPE redirection. cmd: Fix TYPE behavior.