822bd149bf
Convert files gdb.base/[n-r]*.exp to use standard_output_file et al. * gdb.base/nextoverexit.exp, gdb.base/nextoverexit.exp, gdb.base/nodebug.exp, gdb.base/nofield.exp, gdb.base/nostdlib.exp, gdb.base/opaque.exp, gdb.base/overlays.exp, gdb.base/pc-fp.exp, gdb.base/pending.exp, gdb.base/permissions.exp, gdb.base/pie-execl.exp, gdb.base/pointers.exp, gdb.base/pr11022.exp, gdb.base/print-file-var.exp, gdb.base/printcmds.exp, gdb.base/prologue.exp, gdb.base/psymtab.exp, gdb.base/ptr-typedef.exp, gdb.base/ptype.exp, gdb.base/randomize.exp, gdb.base/readline-ask.exp, gdb.base/recpar.exp, gdb.base/recurse.exp, gdb.base/relativedebug.exp, gdb.base/relocate.exp, gdb.base/remote.exp, gdb.base/reread.exp, gdb.base/return-nodebug.exp, gdb.base/return2.exp: Use standard_testfile, standard_output_file, prepare_for_testing, clean_restart.
115 lines
2.9 KiB
Text
115 lines
2.9 KiB
Text
# Copyright (C) 2011-2013 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
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
standard_testfile .c
|
|
set inputrc ${srcdir}/${subdir}/${testfile}.inputrc
|
|
|
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
|
|
untested ${testfile}.exp
|
|
return -1
|
|
}
|
|
|
|
# INPUTRC gets reset for the next testfile.
|
|
setenv INPUTRC $inputrc
|
|
clean_restart ${binfile}
|
|
|
|
gdb_test_no_output "set width 50"
|
|
gdb_test_no_output "set height 3"
|
|
|
|
set cmd "p symbol_0"
|
|
send_gdb "$cmd\t"
|
|
set test "bell for more message"
|
|
gdb_test_multiple "" $test {
|
|
-re "$cmd\007$" {
|
|
pass $test
|
|
}
|
|
}
|
|
|
|
send_gdb "\t"
|
|
set test "more message for 01 and 02"
|
|
gdb_test_multiple "" $test {
|
|
-re "^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
|
|
pass $test
|
|
}
|
|
-re "$gdb_prompt " {
|
|
fail $test
|
|
}
|
|
}
|
|
|
|
# There get some VT100 characters printed.
|
|
|
|
send_gdb "\r"
|
|
set test "more message for 03"
|
|
gdb_test_multiple "" $test {
|
|
-re "\rsymbol_03_length_40_____________________\r\n--More--$" {
|
|
pass $test
|
|
}
|
|
}
|
|
|
|
# "$gdb_prompt $" will not match as $cmd gets output: $gdb_prompt p symbol_0
|
|
# And "$gdb_prompt p symbol_0" cannot be matched as the default "$gdb_prompt $"
|
|
# string from gdb_test_multiple could match earlier.
|
|
|
|
send_gdb "\r"
|
|
set test "more finish for 04"
|
|
gdb_test_multiple "" $test {
|
|
-re "\rsymbol_04_length_40_____________________\r\n$gdb_prompt " {
|
|
pass $test
|
|
}
|
|
}
|
|
|
|
gdb_test "foo" {No symbol "symbol_0foo" in current context\.} "abort more message"
|
|
|
|
set cmd "p symbol_"
|
|
send_gdb "$cmd\t"
|
|
set test "bell for ask message"
|
|
gdb_test_multiple "" $test {
|
|
-re "$cmd\007$" {
|
|
pass $test
|
|
}
|
|
}
|
|
|
|
send_gdb "\t"
|
|
set test "ask message"
|
|
gdb_test_multiple "" $test {
|
|
-re "^\r\nDisplay all 5 possibilities\\? \\(y or n\\)$" {
|
|
pass $test
|
|
}
|
|
-re "$gdb_prompt " {
|
|
fail $test
|
|
return 0
|
|
}
|
|
}
|
|
|
|
send_gdb "y"
|
|
set test "ask message for 01 and 02"
|
|
gdb_test_multiple "" $test {
|
|
-re "^\r\nsymbol_01_length_40_____________________\r\nsymbol_02_length_40_____________________\r\n--More--$" {
|
|
pass $test
|
|
}
|
|
}
|
|
|
|
# There get some VT100 characters printed.
|
|
# See the "$gdb_prompt " match like in "more finish for 04".
|
|
|
|
send_gdb "n"
|
|
set test "ask message no"
|
|
gdb_test_multiple "" $test {
|
|
-re "\r$gdb_prompt " {
|
|
pass $test
|
|
}
|
|
}
|
|
|
|
gdb_test "foo" {No symbol "symbol_foo" in current context\.} "abort ask message"
|