Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-14025

[CMD] BAT/CMD processing missing end of line space when prompt echoed

    Details

    • Type: Improvement
    • Status: Untriaged
    • Priority: Minor
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Shell
    • Labels:
      None

      Description

      After creating the ReactOS API Test for cmd (cmd_apitest.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.

        Attachments

        1. After_SG_Patch.txt
          4 kB
        2. batch07.c.patch
          0.6 kB
        3. cmd_winetest_for_ros.exe
          54 kB
        4. cmd_winetest_for_win.exe
          54 kB
        5. ros_test_builtins.cmd.exp
          0.7 kB
        6. test_builtins.cmd
          0.8 kB
        7. win_test_builtins.cmd.exp
          0.8 kB

          Issue Links

            Activity

              People

              • Assignee:
                hbelusca HBelusca
                Reporter:
                DougLyons Doug Lyons
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: