diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-05-30 02:54:41 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-05-30 02:54:41 +0000 |
commit | 5ea2a32c884a33f3707e03f09bec8b75b37d7877 (patch) | |
tree | e24c5ed902d8fd973191121deb9077e6e863e623 /gdb/testsuite/gdb.base | |
parent | 41ea10b1342d4443d26efd936d75087cc199ca87 (diff) | |
download | gdb-5ea2a32c884a33f3707e03f09bec8b75b37d7877.zip gdb-5ea2a32c884a33f3707e03f09bec8b75b37d7877.tar.gz gdb-5ea2a32c884a33f3707e03f09bec8b75b37d7877.tar.bz2 |
* gdb.base/completion.exp (INPUTRC): Set this environment variable
to a known value in order to get consistent results regardless
of the setting of INPUTRC or the presence or contents of .inputrc.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/completion.exp | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp index 9fa44c0..8c8f676 100644 --- a/gdb/testsuite/gdb.base/completion.exp +++ b/gdb/testsuite/gdb.base/completion.exp @@ -72,6 +72,19 @@ if [get_compiler_info ${binfile}] { } gdb_exit + +# Don't let a .inputrc file or an existing setting of INPUTRC mess up +# the test results. Even if /dev/null doesn't exist on the particular +# platform, the readline library will use the default setting just by +# failing to open the file. OTOH, opening /dev/null successfully will +# also result in the default settings being used since nothing will be +# read from this file. +global env +if [info exists env(INPUTRC)] { + set old_inputrc $env(INPUTRC) +} +set env(INPUTRC) "/dev/null" + gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} @@ -596,19 +609,12 @@ gdb_expect { timeout { fail "(timeout) complete 'set follow-fork-mode'" } } +# Restore globals modified in this test... +if [info exists old_inputrc] { + set env(INPUTRC) $old_inputrc +} else { + unset env(INPUTRC) +} set timeout $oldtimeout1 -return 0 - - - - - - - - - - - - - +return 0 |