testsuite: skip confirmation in 'gdb_reinitialize_dir'master
commitbe740e7cc62fed098ad62cef3b2e2b25b44d8748
authorRohr, Stephan <stephan.rohr@intel.com>
Thu, 19 Sep 2024 10:55:19 +0000 (19 12:55 +0200)
committerStephan Rohr <stephan.rohr@intel.com>
Thu, 21 Nov 2024 08:49:39 +0000 (21 00:49 -0800)
tree0dc2a1eefc521536f835a4836223528646565266
parent25f0170973a7738fb47e4ae721a08e7e8d982489
testsuite: skip confirmation in 'gdb_reinitialize_dir'

Some shells automatically confirm the 'dir' command:

  (gdb) dir
  Reinitialize source path to empty? (y or n)
    [answered Y; input not from terminal]
  Source directories searched: $cdir;$cwd
  (gdb) y
  dir <...>/gdb/testsuite/gdb.base
  Undefined command: "y".  Try "help".

For example, this reprdocues in a MinGW32 environment with
'TERM=dumb'.  Skip sending 'y' if the command is already confirmed.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/lib/gdb.exp