aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-08-08 22:26:28 +0200
committerTom de Vries <tdevries@suse.de>2019-08-08 22:26:28 +0200
commit128d6509819d9d4fe6f52d1a5dcc458b9cbd0f4c (patch)
treeecbb4551c4b3090c5c8037583620c0c6eeee279a /gdb/testsuite
parentdbe15e4e1dda8e20cc347ced751631d49a5f57de (diff)
downloadgdb-128d6509819d9d4fe6f52d1a5dcc458b9cbd0f4c.zip
gdb-128d6509819d9d4fe6f52d1a5dcc458b9cbd0f4c.tar.gz
gdb-128d6509819d9d4fe6f52d1a5dcc458b9cbd0f4c.tar.bz2
[gdb/testsuite] Fix gdb.tui/basic.exp with check-read1
With gdb.tui/basic.exp and check-read1, we run into (using -v for verbose log): ... ^[[0+++ _csi_0 <<<>>> ERROR: (DejaGnu) proc "_csi_0" does not exist. ... In contrast, without check-read1, we have: ... ^[[0;10m<SNIP>+++ _csi_m <<<0;10>>> ... The problem is that this regexp in _accept: ... -re "^\x1b\\\[(\[0-9;\]*)(\[0-9a-zA-Z@\])" { ... while matching the longer sequence '^[' '[' '0' ';' '1' '0' 'm', also matches the shorter sequence '^[' '[' '0'. The regexp attempts to match a CSI (Control Sequence Introducer) sequence, and the final byte of such a sequence cannot be a digit. Fix the regexp accordingly: ... - -re "^\x1b\\\[(\[0-9;\]*)(\[0-9a-zA-Z@\])" { + -re "^\x1b\\\[(\[0-9;\]*)(\[a-zA-Z@\])" { ... Tested on x86_64-linux. gdb/testsuite/ChangeLog: 2019-08-08 Tom de Vries <tdevries@suse.de> PR testsuite/24862 * lib/tuiterm.exp (_accept): Fix CSI regexp.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/tuiterm.exp2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 27e3bb6..eaf6390 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-08-08 Tom de Vries <tdevries@suse.de>
+
+ PR testsuite/24862
+ * lib/tuiterm.exp (_accept): Fix CSI regexp.
+
2019-08-07 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.base/style.exp: Update tests for help doc new invariants.
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index d94fd43..cd72815 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -392,7 +392,7 @@ namespace eval Term {
verbose "+++ unsupported escape"
error "unsupported escape"
}
- -re "^\x1b\\\[(\[0-9;\]*)(\[0-9a-zA-Z@\])" {
+ -re "^\x1b\\\[(\[0-9;\]*)(\[a-zA-Z@\])" {
set cmd $expect_out(2,string)
set params [split $expect_out(1,string) ";"]
verbose "+++ _csi_$cmd <<<$expect_out(1,string)>>>"