Tests for [ pycmd-Bugs-3388191 ]
Brought to you by:
horeah_bn
Here are a few patches that introduce tests for the ERRORLEVEL behavior introduced in [ pycmd-Bugs-3388191 ].
Unfortunately I had to make changes to PyCmd.py, but the changes are of general benefit (explicit global variable declaration, explicit init and deinit functions), so perhaps that is acceptable.
The ERRORLEVEL support has been rolled back, as it was causing trouble with interrupting batch scripts with Ctrl-C :(
The changes to PyCmd.py have been kept, though, as they are indeed beneficial in a more general way.