From 7b193de63a5444ecf7017d58ecaa03b779e291fa Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 29 Mar 2023 08:01:42 +0200 Subject: [PATCH] [gdb/testsuite] Fix gdb.guile/scm-cmd.exp without readline Fix test-case gdb.guile/scm-cmd.exp using readline_is_used. Tested on x86_64-linux. --- gdb/testsuite/gdb.guile/scm-cmd.exp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/gdb/testsuite/gdb.guile/scm-cmd.exp b/gdb/testsuite/gdb.guile/scm-cmd.exp index a7fb59b0089..25a9780a4d5 100644 --- a/gdb/testsuite/gdb.guile/scm-cmd.exp +++ b/gdb/testsuite/gdb.guile/scm-cmd.exp @@ -149,14 +149,17 @@ gdb_test "complete expr-test bar\." \ "expr-test bar\.bc.*expr-test bar\.ij.*" \ "test completion through complete command" -set test "complete 'expr-test bar.i'" -send_gdb "expr-test bar\.i\t\t" -gdb_test_multiple "" "$test" { - -re "expr-test bar\.ij \\\x07$" { - send_gdb "\n" - gdb_test_multiple "" $test { - -re "invoked on = bar.ij.*$gdb_prompt $" { - pass "$test" + +if { [readline_is_used] } { + set test "complete 'expr-test bar.i'" + send_gdb "expr-test bar\.i\t\t" + gdb_test_multiple "" "$test" { + -re "expr-test bar\.ij \\\x07$" { + send_gdb "\n" + gdb_test_multiple "" $test { + -re "invoked on = bar.ij.*$gdb_prompt $" { + pass "$test" + } } } } -- 2.30.2