eric pouech (@epo) commented about programs/cmd/tests/test_builtins.cmd:
echo Skipped as not enough permissions echo --- resetting association echo original value +:ExitFtype
+echo ------------ Testing mode ------------ +call :setError 666 & (mode CON >nul &&echo SUCCESS||echo FAILURE)
since native implements mode as an external command (mode.com), you don't need to bother with return code (success vs failure)
so,
`call :setError 666 & mode CON >nul`
`echo %errorlevel%`
should be sufficient