public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed] [gdb/testsuite] Generate long string in gdb.base/page.exp
Date: Fri,  5 May 2023 18:57:20 +0200	[thread overview]
Message-ID: <20230505165720.15500-1-tdevries@suse.de> (raw)

I noticed in gdb.base/page.exp:
...
set fours [string repeat 4 40]
...
but then shortly afterwards:
...
    [list 1\r\n 2\r\n 3\r\n 444444444444444444444444444444]
...

Summarize the long string in the same way using string repeat:
...
    [list 1\r\n 2\r\n 3\r\n [string repeat 4 30]]
...

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.base/page.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/page.exp b/gdb/testsuite/gdb.base/page.exp
index 327f953c520..f7b1317e39c 100644
--- a/gdb/testsuite/gdb.base/page.exp
+++ b/gdb/testsuite/gdb.base/page.exp
@@ -90,7 +90,7 @@ gdb_test_no_output "set width 30"
 send_gdb "printf \"$str\"\n"
 gdb_expect_list "paged count for interrupt" \
     ".*$pagination_prompt" \
-    [list 1\r\n 2\r\n 3\r\n 444444444444444444444444444444]
+    [list 1\r\n 2\r\n 3\r\n [string repeat 4 30]]
 
 gdb_test "q" "Quit" "quit while paging"
 

base-commit: 58d047ac2597d7b9e89e1723aaf67dfe51f8117b
-- 
2.35.3


                 reply	other threads:[~2023-05-05 16:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230505165720.15500-1-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).