From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19964 invoked by alias); 4 Dec 2001 17:14:44 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 19866 invoked from network); 4 Dec 2001 17:14:39 -0000 Received: from unknown (HELO zwingli.cygnus.com) (208.245.165.35) by sources.redhat.com with SMTP; 4 Dec 2001 17:14:39 -0000 Received: by zwingli.cygnus.com (Postfix, from userid 442) id 2C1E55E9D8; Tue, 4 Dec 2001 12:15:57 -0500 (EST) From: Jim Blandy To: gdb-patches@sources.redhat.com Subject: RFA: cd before completing Message-Id: <20011204171557.2C1E55E9D8@zwingli.cygnus.com> Date: Tue, 04 Dec 2001 09:14:00 -0000 X-SW-Source: 2001-12/txt/msg00103.txt.bz2 2001-12-04 Jim Blandy * 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"