gdb/testsuite: fix two "maint info line-table"-related tests
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 4 Dec 2021 02:01:42 +0000 (21:01 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 4 Dec 2021 02:03:10 +0000 (21:03 -0500)
Commit 92228a334ba2 ("gdb: small "maintenance info line-table"
readability improvements") change the output format of "maint info
line-table" slightly, adding some empty lines between each
line-table.  This causes two tests to start failing, update them to
account for those empty lines.

Change-Id: I9d33a58fce3e860ba0554b25f5582e8066a5c519

gdb/testsuite/gdb.base/maint.exp
gdb/testsuite/gdb.dwarf2/dw2-ranges-base.exp

index 4b200879728e07b953d9fe49f90a638c281dd92a..667f3733c9a7aada474a32bf67a4234c66e9a55c 100644 (file)
@@ -466,6 +466,10 @@ gdb_test_multiple "maint info line-table" \
        # Matches an end marker in the above.
        exp_continue
     }
+    -re "^\r\n" {
+       # Empty line between tables.
+       exp_continue
+    }
     -re "^$gdb_prompt $" {
        gdb_assert $saw_srcfile $gdb_test_name
     }
index d55b7fd150eff3d24d652873a22b70e915c1fa43..1a4fe4a3bb6928cb8b7e147232c3ec2bc482c81a 100644 (file)
@@ -173,6 +173,10 @@ gdb_test_multiple "maint info line-table gdb.dwarf2/dw2-ranges-base.c" \
            incr end_seq_count
            exp_continue
        }
+       -re "^\r\n" {
+           # Empty lines between tables.
+           exp_continue
+       }
        -re "^$gdb_prompt $" {
            gdb_assert [expr $end_seq_count == 3] $gdb_test_name
        }