Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* RFA: cd before completing
@ 2001-12-04  9:14 Jim Blandy
  2001-12-04 10:15 ` Daniel Jacobowitz
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jim Blandy @ 2001-12-04  9:14 UTC (permalink / raw)
  To: gdb-patches


2001-12-04  Jim Blandy  <jimb@redhat.com>

	* gdb.base/completion.exp: Rather than completing very long
	filenames, which can make the readline library produce output we
	don't recognize, cd to the directory first, and then complete
	using nice, short relative paths.

*** gdb/testsuite/gdb.base/completion.exp.orig	Tue Dec  4 12:12:05 2001
--- gdb/testsuite/gdb.base/completion.exp	Tue Dec  4 12:13:36 2001
***************
*** 585,618 ****
      timeout { fail "(timeout) complete (2) 'p no_var_by_this_name-'" }
  }
  
! send_gdb "file ${objdir}/Make\t"
  sleep 1
  gdb_expect  {
!         -re "file ${objdir}/Makefile.*$"\
              { send_gdb "\n"
                gdb_expect {
                        -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"\
                        { send_gdb "n\n"
                          gdb_expect {
                                  -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
!                                         { pass "complete 'file Make'"}
!                                 -re ".*$gdb_prompt $" { fail "complete 'file Make'"}
!                                 timeout           {fail "(timeout) complete 'file Make'"}
                                 }
                        }
!                       -re ".*$gdb_prompt $" { fail "complete 'file Make'"}
!                       timeout           {fail "(timeout) complete 'file Make'"}
                       }
              }
!         -re ".*$gdb_prompt $"       { fail "complete 'file Make'" }
!         timeout         { fail "(timeout) complete 'file Make'" }
          }
  
  
! send_gdb "file ${srcdir}/gdb.base/compl\t"
  sleep 1
  gdb_expect  {
!         -re "^file ${srcdir}/gdb.base/completion\\.exp $"\
              { send_gdb "\n"
                gdb_expect {
                        -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"
--- 585,623 ----
      timeout { fail "(timeout) complete (2) 'p no_var_by_this_name-'" }
  }
  
! # Rather than completing very long filenames, which can make the
! # readline library produce output we don't recognize, cd to the
! # directory first, and then complete using nice, short relative paths.
! gdb_test "cd ${objdir}" "Working directory ${objdir}.*" "cd to \${objdir}"
! send_gdb "file ./Make\t"
  sleep 1
  gdb_expect  {
!         -re "file ./Makefile.*$"\
              { send_gdb "\n"
                gdb_expect {
                        -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"\
                        { send_gdb "n\n"
                          gdb_expect {
                                  -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
!                                         { pass "complete 'file ./Make'"}
!                                 -re ".*$gdb_prompt $" { fail "complete 'file ./Make'"}
!                                 timeout           {fail "(timeout) complete 'file ./Make'"}
                                 }
                        }
!                       -re ".*$gdb_prompt $" { fail "complete 'file ./Make'"}
!                       timeout           {fail "(timeout) complete 'file ./Make'"}
                       }
              }
!         -re ".*$gdb_prompt $"       { fail "complete 'file ./Make'" }
!         timeout         { fail "(timeout) complete 'file ./Make'" }
          }
  
  
! gdb_test "cd ${srcdir}" "Working directory ${srcdir}.*" "cd to \${srcdir}"
! send_gdb "file ./gdb.base/compl\t"
  sleep 1
  gdb_expect  {
!         -re "^file ./gdb.base/completion\\.exp $"\
              { send_gdb "\n"
                gdb_expect {
                        -re "\r\nA program is being debugged already\\.  Kill it\\? \\(y or n\\) $"
***************
*** 620,636 ****
                        { send_gdb "n\n"
                          gdb_expect {
                                  -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
!                                         { pass "complete 'file gdb.base/compl'"}
!                                 -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
!                                 timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
                                 }
                        }
!                       -re ".*$gdb_prompt $" { fail "complete 'file gdb.base/compl'"}
!                       timeout           {fail "(timeout) complete 'file gdb.base/compl'"}
                       }
              }
!         -re ".*$gdb_prompt $"       { fail "complete 'file gdb.base/compl'" }
!         timeout         { fail "(timeout) complete 'file gdb.base/compl'" }
          }
  
  send_gdb "info func mark\t"
--- 625,641 ----
                        { send_gdb "n\n"
                          gdb_expect {
                                  -re "\r\nProgram not killed\\.\r\n$gdb_prompt $"\
!                                         { pass "complete 'file ./gdb.base/compl'"}
!                                 -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/compl'"}
!                                 timeout           {fail "(timeout) complete 'file ./gdb.base/compl'"}
                                 }
                        }
!                       -re ".*$gdb_prompt $" { fail "complete 'file ./gdb.base/compl'"}
!                       timeout           {fail "(timeout) complete 'file ./gdb.base/compl'"}
                       }
              }
!         -re ".*$gdb_prompt $"       { fail "complete 'file ./gdb.base/compl'" }
!         timeout         { fail "(timeout) complete 'file ./gdb.base/compl'" }
          }
  
  send_gdb "info func mark\t"


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-12-17 23:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-04  9:14 RFA: cd before completing Jim Blandy
2001-12-04 10:15 ` Daniel Jacobowitz
2001-12-04 14:51   ` Jim Blandy
2001-12-04 14:57     ` Daniel Jacobowitz
2001-12-13 12:15 ` Kevin Buettner
2001-12-16 12:31   ` Jim Blandy
2001-12-17 15:00 ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox