Running tclint on the test-cases in gdb.pascal shows a few problems.
Fix these.
Tested on aarch64-linux.
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
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 $" {
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
# 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 *-*-*
}
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 *-*-*
clean_restart
-if [set_lang_pascal] {
+if { [set_lang_pascal] } {
test_float_accepted
test_float_rejected
} else {
# 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