]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite, tclint] Fix gdb.pascal
authorTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:11:29 +0000 (15:11 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:11:29 +0000 (15:11 +0200)
Running tclint on the test-cases in gdb.pascal shows a few problems.

Fix these.

Tested on aarch64-linux.

gdb/testsuite/gdb.pascal/floats.exp
gdb/testsuite/gdb.pascal/gdb11492.exp
gdb/testsuite/gdb.pascal/hello.exp
gdb/testsuite/gdb.pascal/integers.exp
gdb/testsuite/gdb.pascal/print.exp
gdb/testsuite/gdb.pascal/types.exp

index a0c37ad151bf4212f7d94270ab32645b0af9831e..926c0c3df7f93533ef55a027bd2c9df394adddda 100644 (file)
@@ -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 $" {
index e39f5226984344449a44ebe0fa1da4f3d1d0e654..67764c5f465b7608fe3491c948696075c73cd918 100644 (file)
@@ -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
index 904f2a9c05bfb7f1bfa5a8e9226bdfbf65de9407..ac102805a18dde944ee4258decfa438c5b5c969b 100644 (file)
@@ -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 *-*-*
 }
index c9974a17a86d8a3715e17871223182d0d9fa8a73..12d15c8d4917c462003eb09e59cf3271951e46af 100644 (file)
@@ -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 *-*-*
index 98b08797f030bdd82228493c567a8d9d14bcb6c1..18dff4b0716445e004a40d3f3c1d94ee0fa62fb8 100644 (file)
@@ -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 {
index c234c283758c8375a5c6ccf230f0d8a03d2e23c4..b4949f5004bf3e001539a14db4445be0d4b3ed2e 100644 (file)
@@ -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