* gdb.base/printcmds.exp: Fix "check for floating addition"

regexp to accept results within approx +/- .01 of exact value.
	* lib/gdb.exp (gdb_test): Remove unused expect_out global decl.
This commit is contained in:
Fred Fish
1997-06-22 16:17:49 +00:00
parent 4a9d4495eb
commit 41438a392a
3 changed files with 13 additions and 5 deletions

View File

@ -1,3 +1,9 @@
Sun Jun 22 09:11:02 1997 Fred Fish <fnf@cygnus.com>
* gdb.base/printcmds.exp: Fix "check for floating addition"
regexp to accept results within approx +/- .01 of exact value.
* lib/gdb.exp (gdb_test): Remove unused expect_out global decl.
Wed Jun 18 11:11:39 1997 Bob Manson <manson@charmed.cygnus.com> Wed Jun 18 11:11:39 1997 Bob Manson <manson@charmed.cygnus.com>
* lib/gdb.exp(gdb_init): Pass our arguments to default_gdb_init * lib/gdb.exp(gdb_init): Pass our arguments to default_gdb_init

View File

@ -1,4 +1,4 @@
# Copyright (C) 1992, 1994, 1995 Free Software Foundation, Inc. # Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
@ -12,7 +12,7 @@
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software # along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to: # Please email any bugs, comments, and/or additions to this file to:
# bug-gdb@prep.ai.mit.edu # bug-gdb@prep.ai.mit.edu
@ -113,9 +113,12 @@ proc test_integer_literals_rejected {} {
# lexer thinks that 123DEADBEEF is a floating point number, but # lexer thinks that 123DEADBEEF is a floating point number, but
# then fails to notice that atof() only eats the 123 part. # then fails to notice that atof() only eats the 123 part.
# FIXME: This should be put into PRMS. # FIXME: This should be put into PRMS.
# Fixed, 4/25/97, by Bob Manson.
setup_xfail "*-*-*"
test_print_reject "p 123DEADBEEF" test_print_reject "p 123DEADBEEF"
test_print_reject "p 123foobar.bazfoo3"
test_print_reject "p 123EEEEEEEEEEEEEEEEE33333k333"
gdb_test "p 123.4+56.7" "180.(099\[0-9]*|100\[0-9\]*)" "check for floating addition"
# Test various octal values. # Test various octal values.
@ -990,7 +993,7 @@ proc test_printf {} {
# Test mixing args of different sizes. # Test mixing args of different sizes.
gdb_test "printf \"x=%d,y=%f,z=%d\\n\", 5, 6.0, 7" "x=5,y=6\.0+,z=7" gdb_test "printf \"x=%d,y=%f,z=%d\\n\", 5, 6.0, 7" "x=5,y=6\.0+,z=7"
gdb_test "printf \"%x %f, %c %x, %x, %f\\n\", 0xbad, -99.541, 'z',\ gdb_test "printf \"%x %f, %c %x, %x, %f\\n\", 0xbad, -99.541, 'z',\
0xfeedface, 0xdeadbeef, 5.0" "bad -99.5410+, z feedface, deadbeef, 5.0+" 0xfeedface, 0xdeadbeef, 5.0" "bad -99.54\[0-9\]+, z feedface, deadbeef, 5.0+"
} }
# Start with a fresh gdb. # Start with a fresh gdb.

View File

@ -324,7 +324,6 @@ proc gdb_test { args } {
global verbose global verbose
global gdb_prompt global gdb_prompt
global GDB global GDB
global expect_out
upvar timeout timeout upvar timeout timeout
if [llength $args]>2 then { if [llength $args]>2 then {