diff options
author | Pedro Alves <palves@redhat.com> | 2018-06-14 12:25:41 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2018-06-14 12:25:41 +0100 |
commit | 11ae5818f76e0af4dcf7ee069e0756ccf6901ebe (patch) | |
tree | fe968f2c9657448ffbd2b0600aafa081d1f5f987 /gdb/testsuite/gdb.gdb | |
parent | a898ca0e0c5893c58b60a7f76225d104df240549 (diff) | |
download | gdb-11ae5818f76e0af4dcf7ee069e0756ccf6901ebe.zip gdb-11ae5818f76e0af4dcf7ee069e0756ccf6901ebe.tar.gz gdb-11ae5818f76e0af4dcf7ee069e0756ccf6901ebe.tar.bz2 |
gdb.gdb/selftest.exp, Use multi_line to build gdb's expected startup output
This regex had to be touched at least twice these past few days. Use
multi_line to make it more readable.
Note this also tightens the regex a little bit in some spots.
gdb/testsuite/ChangeLog:
2018-06-14 Pedro Alves <palves@redhat.com>
* gdb.gdb/selftest.exp (test_with_self): Use multi_line to build
gdb's expected startup output.
Diffstat (limited to 'gdb/testsuite/gdb.gdb')
-rw-r--r-- | gdb/testsuite/gdb.gdb/selftest.exp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.gdb/selftest.exp b/gdb/testsuite/gdb.gdb/selftest.exp index 314bddb..3b200a2 100644 --- a/gdb/testsuite/gdb.gdb/selftest.exp +++ b/gdb/testsuite/gdb.gdb/selftest.exp @@ -63,10 +63,19 @@ proc test_with_self { } { # Wait a bit while the inferior gdb gets to its prompt. sleep 1 } else { + set banner [multi_line \ + "GNU gdb \[0-9\.\]*\[^\r\n\]*" \ + "Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc\." \ + "License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>" \ + "This is free software: you are free to change and redistribute it\." \ + "There is NO WARRANTY, to the extent permitted by law\." \ + "Type \"show copying\" and \"show warranty\" for details\." \ + "This GDB was configured as .*" \ + "$gdb_prompt $"] set test "xgdb is at prompt" gdb_test_multiple "continue" $test { -i "$inferior_spawn_id" - -re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law\..*Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" { + -re "$banner" { pass $test } } |