Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: cd before completing
Date: Tue, 04 Dec 2001 09:14:00 -0000	[thread overview]
Message-ID: <20011204171557.2C1E55E9D8@zwingli.cygnus.com> (raw)


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"


             reply	other threads:[~2001-12-04 17:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-04  9:14 Jim Blandy [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011204171557.2C1E55E9D8@zwingli.cygnus.com \
    --to=jimb@zwingli.cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox