diff options
author | Mark Kettenis <kettenis@gnu.org> | 2003-06-08 13:14:05 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2003-06-08 13:14:05 +0000 |
commit | b5ca37229df68e9f14e491e25a47cc5b61a04e04 (patch) | |
tree | 19888752b74d538b3e8fd303a94cfc8906a2d0ea /gdb/testsuite/gdb.base/readline.exp | |
parent | 03ed860d174afc6b71a0bd1e15a7c41638a48a71 (diff) | |
download | gdb-b5ca37229df68e9f14e491e25a47cc5b61a04e04.zip gdb-b5ca37229df68e9f14e491e25a47cc5b61a04e04.tar.gz gdb-b5ca37229df68e9f14e491e25a47cc5b61a04e04.tar.bz2 |
* gdb.base/readline.exp: Add tests for operate-and-get-next with a
fully filled history list.
* gdb.base/gdb_history: New file.
Diffstat (limited to 'gdb/testsuite/gdb.base/readline.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/readline.exp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/readline.exp b/gdb/testsuite/gdb.base/readline.exp index 8edd133..511cb6b 100644 --- a/gdb/testsuite/gdb.base/readline.exp +++ b/gdb/testsuite/gdb.base/readline.exp @@ -169,7 +169,7 @@ set timeout 30 # A simple test of operate-and-get-next. operate_and_get_next "Simple operate-and-get-next" \ "p 1" ".* = 1" \ - "p 2" ".* = 2"\ + "p 2" ".* = 2" \ "p 3" ".* = 3" # Test operate-and-get-next with a secondary prompt. @@ -179,12 +179,44 @@ operate_and_get_next "operate-and-get-next with secondary prompt" \ "end" ".* = 5" +# Now repeat the first test with a history file that fills the entire +# history list. + +if [info exists env(GDBHISTFILE)] { + set old_gdbhistfile $env(GDBHISTFILE) +} +if [info exists env(HISTSIZE)] { + set old_histsize $env(HISTSIZE) +} +set env(GDBHISTFILE) "${srcdir}/${subdir}/gdb_history" +set env(HISTSIZE) "10" + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir + +operate_and_get_next "Simple operate-and-get-next" \ + "p 7" ".* = 7" \ + "p 8" ".* = 8" \ + "p 9" ".* = 9" + + # 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 { + unset env(GDBHISTFILE) +} +if [info exists old_histsize] { + set env(HISTSIZE) $old_histsize +} else { + unset env(HISTSIZE) +} set timeout $oldtimeout1 return 0 |