On Sat Aug 30 11:46:33 2025 +0000, Joe Souza wrote:
- what behavior are fixed by this MR?
^Z does not terminate a copy of text from the console device.
- which interactive tests did you perform with/without this MR ?
copy con tmp.txt copy con: tmp.txt copy con:s tmp.txt copy /b con tmp.txt In each case above, text was entered, followed by ^Z. copy nul tmp.txt copy nul: tmp.txt Both of these cases also worked as expected.
- does copy /b con foo uses the ascii mode ?
Native Win10 appears to force ASCII mode for 'copy con' even if /b were specified. ^Z still terminated the copy operation.
- does the new behavior of changing copy mode for CON applies to other
devices ? That's an interesting question. My best answer is no. LPTx is an output device. COMx perhaps, although these are mainly configured via MODE, and I don't have a good way to test that functionality. Should be easy to add an additional device name comparison in the future if it is found to be needed.
Thanks for the answers. A) I was wondering if there were a specific handling for devices vs per device specific behaviors. As copy /b com1 is handled in binary whereas copy /b con isn't (and assuming you did test "copy /b con foo" and not "copy con foo /b"), keeping per device behavior looks a good choice. B) For the tests I would add: Copy /a con+in out Copy /a in+con out Copy /b con+in out Copy /b in+con out Copy con+in out Copy in+con out Where in is a file containing a ctrl-z, and checkin in out file the final result (just to be sure that forcing ascii for con has no impact on prev/next copied files)