2006-12-30 20:59:07 +00:00
|
|
|
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=215816
|
|
|
|
|
2007-01-11 21:28:57 +00:00
|
|
|
2007-01-03 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
Daniel Jacobowitz <dan@codesourcery.com>
|
|
|
|
|
|
|
|
* gdb.base/readline.exp: Set $TERM. Test arrow keys in
|
|
|
|
secondary prompts.
|
|
|
|
|
2007-12-22 14:38:42 +00:00
|
|
|
2007-07-01 Nick Roberts <nickrob@snap.net.nz>
|
|
|
|
Daniel Jacobowitz <dan@codesourcery.com>
|
|
|
|
|
|
|
|
* gdb.base/annota3.exp: Test for if construct.
|
2007-01-11 21:28:57 +00:00
|
|
|
|
|
|
|
--- ./gdb/testsuite/gdb.base/readline.exp 8 Jun 2003 13:14:05 -0000 1.2
|
|
|
|
+++ ./gdb/testsuite/gdb.base/readline.exp 3 Jan 2007 21:22:47 -0000
|
|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
-# Copyright 2002 Free Software Foundation, Inc.
|
|
|
|
+# Copyright 2002, 2003, 2007 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
|
|
|
|
@@ -159,6 +159,14 @@ if [info exists 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)
|
2006-12-30 20:59:07 +00:00
|
|
|
+}
|
2007-01-11 21:28:57 +00:00
|
|
|
+set env(TERM) "vt100"
|
|
|
|
+
|
|
|
|
gdb_start
|
|
|
|
gdb_reinitialize_dir $srcdir/$subdir
|
|
|
|
|
|
|
|
@@ -178,6 +186,18 @@ operate_and_get_next "operate-and-get-ne
|
|
|
|
"p 5" "" \
|
|
|
|
"end" ".* = 5"
|
|
|
|
|
|
|
|
+# Verify that arrow keys work in secondary prompts. The control
|
|
|
|
+# sequence is a hard-coded VT100 up arrow.
|
|
|
|
+gdb_test "print 42" "\\\$\[0-9\]* = 42"
|
|
|
|
+set msg "arrow keys with secondary prompt"
|
|
|
|
+gdb_test_multiple "if 1 > 0\n\033\[A\033\[A\nend" $msg {
|
|
|
|
+ -re ".*\\\$\[0-9\]* = 42\r\n$gdb_prompt $" {
|
|
|
|
+ pass $msg
|
|
|
|
+ }
|
|
|
|
+ -re ".*Undefined command:.*$gdb_prompt $" {
|
|
|
|
+ fail $msg
|
|
|
|
+ }
|
2006-12-30 20:59:07 +00:00
|
|
|
+}
|
2007-01-11 21:28:57 +00:00
|
|
|
|
|
|
|
# Now repeat the first test with a history file that fills the entire
|
|
|
|
# history list.
|
2007-12-22 14:38:42 +00:00
|
|
|
===================================================================
|
|
|
|
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/annota3.exp,v
|
|
|
|
retrieving revision 1.12
|
|
|
|
retrieving revision 1.13
|
|
|
|
diff -u -r1.12 -r1.13
|
|
|
|
--- src/gdb/testsuite/gdb.base/annota3.exp 2007/01/09 17:59:09 1.12
|
|
|
|
+++ src/gdb/testsuite/gdb.base/annota3.exp 2007/07/01 22:37:52 1.13
|
|
|
|
@@ -99,7 +99,29 @@
|
|
|
|
"set annotate 3"
|
|
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
+#
|
|
|
|
+# if construct:
|
|
|
|
+#
|
|
|
|
+send_gdb "if 1\n"
|
|
|
|
+gdb_expect {
|
|
|
|
+ -re "^if 1\r\n\r\n\032\032post-prompt\r\n\r\n\032\032pre-commands\r\n >\r\n\032\032commands\r\n$" {
|
|
|
|
+ pass "start if construct"
|
|
|
|
+ }
|
|
|
|
+ -re ".*\032\032commands\r\n" {
|
|
|
|
+ fail "start if construct"
|
|
|
|
+ }
|
|
|
|
+ timeout { fail "start if construct (timeout)" }
|
|
|
|
+}
|
|
|
|
+send_gdb "end\n"
|
|
|
|
+gdb_expect {
|
|
|
|
+ -re "^end\r\n\r\n\032\032post-commands\r\n$gdb_prompt$" {
|
|
|
|
+ pass "end if construct"
|
|
|
|
+ }
|
|
|
|
+ -re ".*$gdb_prompt$" {
|
|
|
|
+ fail "end if construct"
|
|
|
|
+ }
|
|
|
|
+ timeout { fail "end if construct (timeout)" }
|
|
|
|
+}
|
|
|
|
#
|
|
|
|
# info break:
|
|
|
|
#
|