From: Tom de Vries Date: Fri, 12 Sep 2025 13:11:29 +0000 (+0200) Subject: [gdb/testsuite, tclint] Fix gdb.pascal X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbd032dc6d6056e76614ea43e1dc7e46cd1b0324;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite, tclint] Fix gdb.pascal Running tclint on the test-cases in gdb.pascal shows a few problems. Fix these. Tested on aarch64-linux. --- diff --git a/gdb/testsuite/gdb.pascal/floats.exp b/gdb/testsuite/gdb.pascal/floats.exp index a0c37ad151b..926c0c3df7f 100644 --- a/gdb/testsuite/gdb.pascal/floats.exp +++ b/gdb/testsuite/gdb.pascal/floats.exp @@ -48,9 +48,9 @@ gdb_test "next" "u := 78\\.3;" "next to 'u := 78.3' line" gdb_test "next" "l := 1;" "next to 'l := 1' line" gdb_test "next" "i := 1;" "next to 'i := 1' line" -# At that point, +# At that point, # r should be equal to 1.25 -gdb_test "print r" " = 1\\.25" +gdb_test "print r" " = 1\\.25" # s should be equal to 2.2 gdb_test "print s" " = 2\\.(199.*|2|200.*)" # t should be equal to -3.2 @@ -120,7 +120,7 @@ gdb_test "next" "s := sin\\(u\\);" "advance to 's := sin(u)' line" gdb_test "print r" " = -1" "test cos(pi) is equal to -1" gdb_test "next" "" "go past 's := sin(u)' line" -set msg "Test sin(pi) is equal to 0" +set msg "Test sin(pi) is equal to 0" gdb_test_multiple "print s" $msg { -re ".* = (0|-?\[0-9\]\\.\[0-9\]*\[eE\](-?\[0-9\]*))\[\r\n\]+$gdb_prompt $" { diff --git a/gdb/testsuite/gdb.pascal/gdb11492.exp b/gdb/testsuite/gdb.pascal/gdb11492.exp index e39f5226984..67764c5f465 100644 --- a/gdb/testsuite/gdb.pascal/gdb11492.exp +++ b/gdb/testsuite/gdb.pascal/gdb11492.exp @@ -37,9 +37,9 @@ if { [gdb_breakpoint ${srcfile}:${bp_location1}] } { gdb_test "continue" "" gdb_test "print integer_array" { = \{50, 51, 52, 53, 54, 55, 56, 57\}} -gdb_test "print /s integer_array" " = '23456789'" +gdb_test "print /s integer_array" " = '23456789'" -gdb_test "print char_array" " = '23456789'" +gdb_test "print char_array" " = '23456789'" gdb_test "print /d char_array" { = \{50, 51, 52, 53, 54, 55, 56, 57\}} gdb_test "print /x char_array" { = \{0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39\}} # Use next two times to avoid GPC line numbering problem diff --git a/gdb/testsuite/gdb.pascal/hello.exp b/gdb/testsuite/gdb.pascal/hello.exp index 904f2a9c05b..ac102805a18 100644 --- a/gdb/testsuite/gdb.pascal/hello.exp +++ b/gdb/testsuite/gdb.pascal/hello.exp @@ -46,7 +46,7 @@ gdb_test "print st" \ # This test also fails for gpc because the program # stops after the string has been written -# while it should stop before writing it +# while it should stop before writing it if { $pascal_compiler_is_gpc } { setup_xfail *-*-* } diff --git a/gdb/testsuite/gdb.pascal/integers.exp b/gdb/testsuite/gdb.pascal/integers.exp index c9974a17a86..12d15c8d491 100644 --- a/gdb/testsuite/gdb.pascal/integers.exp +++ b/gdb/testsuite/gdb.pascal/integers.exp @@ -43,9 +43,9 @@ gdb_test "print i" ".* = 0" "print i before assigned to 1" gdb_test "next" "i := 1;" "next to 'i := 1' line" gdb_test "next" "j := 2;" "next to 'j := 2' line" -# At that point, +# At that point, # i should be equal to 1 -gdb_test "print i" " = 1" +gdb_test "print i" " = 1" # but j should still be equal to zero if { $pascal_compiler_is_gpc } { setup_xfail *-*-* diff --git a/gdb/testsuite/gdb.pascal/print.exp b/gdb/testsuite/gdb.pascal/print.exp index 98b08797f03..18dff4b0716 100644 --- a/gdb/testsuite/gdb.pascal/print.exp +++ b/gdb/testsuite/gdb.pascal/print.exp @@ -59,7 +59,7 @@ proc test_float_rejected {} { clean_restart -if [set_lang_pascal] { +if { [set_lang_pascal] } { test_float_accepted test_float_rejected } else { diff --git a/gdb/testsuite/gdb.pascal/types.exp b/gdb/testsuite/gdb.pascal/types.exp index c234c283758..b4949f5004b 100644 --- a/gdb/testsuite/gdb.pascal/types.exp +++ b/gdb/testsuite/gdb.pascal/types.exp @@ -25,7 +25,7 @@ proc test_integer_literal_types_accepted {} { # Test various decimal values. # Should be integer*4 probably. - gdb_test "pt 123" "type = int" + gdb_test "pt 123" "type = int" } proc test_character_literal_types_accepted {} { global gdb_prompt