[gdb/testsuite] Fix FAIL in gdb.base/printcmds.exp
authorTom de Vries <tdevries@suse.de>
Sat, 14 Mar 2020 09:17:10 +0000 (10:17 +0100)
committerTom de Vries <tdevries@suse.de>
Sat, 14 Mar 2020 09:17:10 +0000 (10:17 +0100)
With test-case gdb.base/printcmds.exp, I run into:
...
(gdb) print teststring2^M
$563 = (charptr) "more contents"^M
(gdb) FAIL: gdb.base/printcmds.exp: print teststring2
...

The corresponding test is:
...
     gdb_test "print teststring2" " = (charptr) \"more contents\""
...

Fix the FAIL by adding the missing quoting for the parentheses around charptr.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-03-14  Tom de Vries  <tdevries@suse.de>

* gdb.base/printcmds.exp: Add missing quoting for "print
teststring2".

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/printcmds.exp

index ec22de89d57898e1e51c5dc361312125ab382530..9f65a4eaa82786cb7fd1bdfc6742a9db9995dcc1 100644 (file)
@@ -1,3 +1,8 @@
+2020-03-14  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.base/printcmds.exp: Add missing quoting for "print
+       teststring2".
+
 2020-03-13  Tom Tromey  <tom@tromey.com>
 
        * gdb.base/printcmds.exp (test_print_strings): Add regression
index 2c8baad5aa839c171c16629c745cdcd19d39ac55..066e7fce87b6fb6919e9ea9f07891cc30ebbccc9 100644 (file)
@@ -520,7 +520,7 @@ proc test_print_strings {} {
        " = (.unsigned char .. )?\"teststring contents\"" "p teststring with elements set to 20"
 
     gdb_test "print teststring2" \
-       " = (charptr) \"more contents\""
+       " = \\(charptr\\) \"more contents\""
 
     gdb_test_no_output "set print elements 8"
 
This page took 0.038788 seconds and 4 git commands to generate.