Add copyright headers.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / readline.exp
index 5cb063037cb40ae01ccb93822eedee0f2cbbb53e..ef7fa130c80688c71f406fc82f663eab9cbdc442 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 2002-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -13,9 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
 # This file was written by Tom Tromey <tromey@redhat.com>
 
 # This file is part of the gdb testsuite.
@@ -139,39 +136,20 @@ proc operate_and_get_next {name args} {
   }
 
   # Match the prompt so the next test starts at the right place.
-  gdb_test "" "" "$name - final prompt"
+  gdb_test "" ".*" "$name - final prompt"
 
   return 1
 }
 
 
-if $tracelevel {
-  strace $tracelevel
-}
-
-# 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"
-
-# The arrow key test relies on the standard VT100 bindings, so make
-# sure that an appropriate terminal is selected.  The same bug
-# doesn't show up if we use ^P / ^N instead.
-if [info exists env(TERM)] {
-    set old_term $env(TERM)
-}
-set env(TERM) "vt100"
-
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
+if { ![readline_is_used] } {
+    unsupported "readline isn't used."
+    return -1
+}
+
 set oldtimeout1 $timeout
 set timeout 30
 
@@ -224,11 +202,6 @@ operate_and_get_next "Simple operate-and-get-next" \
 
 
 # Restore globals modified in this test...
-if [info exists old_inputrc] {
-    set env(INPUTRC) $old_inputrc
-} else {
-    unset env(INPUTRC)
-}
 if [info exists old_gdbhistfile] {
     set env(GDBHISTFILE) $old_gdbhistfile
 } else {
This page took 0.042288 seconds and 4 git commands to generate.