[gdb/testsuite] Simplify gdb.base/info-types.exp.tcl further
authorTom de Vries <tdevries@suse.de>
Tue, 8 Jun 2021 13:36:46 +0000 (15:36 +0200)
committerTom de Vries <tdevries@suse.de>
Tue, 8 Jun 2021 13:36:46 +0000 (15:36 +0200)
commit58f076c6f86dc8361f2e6a6c67940fd9b5ad9a60
treec3605f25c5d6f2b9262d51ac8cd4e6073814e1a9
parent7c757f41aaab38396066d0d57d084a3dc2f5a7d3
[gdb/testsuite] Simplify gdb.base/info-types.exp.tcl further

After adding support for --any in match_line, we can simplify
gdb.base/info-types.exp.tcl further: we can add the "All defined types:"
regexp in the output_lines list:
...
        set output_lines \
            [list \
+                "All defined types:" \
+                "--any" \
                 $file_re \
...

Consequently, we can simplify the state machine to track a variable "found"
with values:
-  0 (unmatched)
-  1 (matched)
- -1 (mismatch).

This makes the code generic enough to factor out into a new proc
gdb_test_lines.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2021-06-08  Tom de Vries  <tdevries@suse.de>

* gdb.base/info-types.exp.tcl (match_line): Handle --any.
(gdb_test_lines): Factor out of ...
(run_test): ... here.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/info-types.exp.tcl
This page took 0.024417 seconds and 4 git commands to generate.