)]}'
{
  "commit": "450165f0845b682d1fc2046ff9ca2a48583cd69a",
  "tree": "1d11ffb03d1366b2b8bf2c4b1ef1c2f1147f24c8",
  "parents": [
    "13f1820106cf8888d8df5fcc0f01e55ed1a10db4"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Fri Aug 08 10:51:18 2025 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Fri Aug 08 10:51:18 2025 +0200"
  },
  "message": "[gdb/testsuite] Add gdb.base/color-prompt.exp\n\nAfter updating the documentation in commit cf03713dd1c (\"[gdb/cli] Document\n\\001 and \\002 usage for set prompt\"), I started to wonder if I could reproduce\nthe CLI issue described in PR cli/28887 using the TUI.\n\nThat turned out not to be the case, but I noticed handling of the markers in\ntui_puts and tui_puts_internal, and no test-case exercising this, so I\ndecided to add this.\n\nAfter doing so in gdb.tui/color-prompt.exp, I realized I could use the same\ncode to test the CLI case.\n\nAdd test-case gdb.base/color-prompt.exp that shares code with\ngdb.tui/color-prompt.exp in gdb.tui/color-prompt.exp.tcl.\n\nFor the CLI case, I was hoping to reproduce the behaviour described in the PR,\nbut it didn\u0027t trigger.\n\nFTR, I manually reproduced the behaviour and used script to record it.  I\nobserved the following sequence after the C-a:\n- ^M (CR)             : go to start of line\n- ^[[K (EL)           : erase line\n- ^M (CR)             : go to start of line\n- ^[[31m(gdb) ^[[0m   : output prompt\n- some long command   : output text\n- ^M (CR)             : go to start of line\n- ^[[C, 15 times (CUF): cursor forward 15 times\ngiving me:\n...\n(gdb) some long command\n               ^\n...\n\nPerhaps we\u0027ll trigger this on some other os, or once we start using a\ndifferent TERM value.\n\nTested on x86_64-linux.\n",
  "tree_diff": [
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c037185700bbb0a4d1d14ed2148c975061bef0d5",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.base/color-prompt.exp"
    },
    {
      "type": "modify",
      "old_id": "a95b24a749bd68e4ca9ba393d5a353749e05f85c",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.tui/color-prompt.exp",
      "new_id": "af6e46708e3ea20cad7ca447b1afdd5e6df4c238",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.tui/color-prompt.exp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e6f4d3bf1dcb0b0eae24ef46472c0ae2fdd1d641",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.tui/color-prompt.exp.tcl"
    },
    {
      "type": "modify",
      "old_id": "b83b8afdcecc5685d993538c56f95b75360c36d7",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/lib/tuiterm.exp",
      "new_id": "1e18a7aa9771e4d22a1ba2e333d622bb77746b4d",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/lib/tuiterm.exp"
    }
  ]
}
