After creating the ReactOS API Test for cmd (cmd_rostest.exe) I started to investigate some of the failures and found that when Echo is On and the line with the prompt is echoed there should be a space at the end of the line which is missing in ReactOS. To see this compile the test api test using the "test_builtins.cmd" and one or the other of the EXP files. Rename the win_test_builtins.cmd.exp to test_builtins.cmd.exp for output that is good in Windows. Rename the ros_test_builtins.cmd.exp to test_builtins.cmd.exp for output that is good in ReactOS. Hopefully now there is enough information for a developer to fix this problem. Thanks.
Edit: The error messages are misleading because it appears that the "compare" routine cannot handle the @xxxx@ substitutions correctly and I believe that this can be improved. Also, the error line numbers refer to the lines in the EXP output file and I would have expected them to refer to the line number in the input CMD file. Note: My guess is that the EXP file represents the Expected output.
Edit2: The MSVC compiled version of cmd.exe will mostly fail with only 14 tests run and 3 failures, but the GCC compiled version will have 50 tests run with 0 failures.