[RFA] re-initialize height to 0 during setshow.exp

Denis PILAT
2007-04-02T14:57:32Z

In testsuite/gdb.base/setshow.exp, after "set height 100", it could
occur that following commands require user interaction to proceed like:
---Type <return> to continue, or q <return> to quit---
(At least it's the case for our gdb in "show user" since we have defined
a lot of user command.)

Attach is a patch that fixes a problem in this test.
We could also add
gdb_test "set height 0" "" "set height 0"
or increase the height to a very large number, but I prefer to reset
height to 0 like done in gdb.exp.

--
Denis

2007-04-02 Denis Pilat <denis.pilat@st.com>

* gdb.base/setshow.exp: Reset height to 0 after having set it to 100.

Index: testsuite/gdb.base/setshow.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/setshow.exp,v
retrieving revision 1.5
diff -u -p -r1.5 setshow.exp
--- testsuite/gdb.base/setshow.exp 9 Jan 2007 17:59:11 -0000 1.5
+++ testsuite/gdb.base/setshow.exp 2 Apr 2007 14:46:58 -0000
@@ -155,6 +155,16 @@ gdb_test "show environment FOOBARBAZ" "F
gdb_test "set height 100" "" "set height 100"
#test show height 100
gdb_test "show height" "Number of lines gdb thinks are in a page is 100..*" "show height"
+
+# back to infinite height to avoid pagers
+send_gdb "set height 0\n"
+ gdb_expect 10 {
+ -re "$gdb_prompt $" {}
+ timeout {
+ warning "Couldn't set the height to 0"
+ }
+}
+
#test set history expansion on
gdb_test "set history expansion on" "" "set history expansion on"
#test show history expansion on