| Index: gdb/testsuite/gdb.ada/complete.exp
|
| diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp
|
| index 4a0f2b4859c39f7c5080068ffb13a3694509678d..1b0e87bc12ec62e65c209b4eb84cfd42d603062c 100644
|
| --- a/gdb/testsuite/gdb.ada/complete.exp
|
| +++ b/gdb/testsuite/gdb.ada/complete.exp
|
| @@ -1,4 +1,4 @@
|
| -# Copyright 2005, 2007, 2009-2012 Free Software Foundation, Inc.
|
| +# Copyright 2005-2013 Free Software Foundation, Inc.
|
| #
|
| # This program is free software; you can redistribute it and/or modify
|
| # it under the terms of the GNU General Public License as published by
|
| @@ -15,12 +15,8 @@
|
|
|
| load_lib "ada.exp"
|
|
|
| -set testdir "complete"
|
| -set testfile "${testdir}/foo"
|
| -set srcfile ${srcdir}/${subdir}/${testfile}.adb
|
| -set binfile ${objdir}/${subdir}/${testfile}
|
| +standard_ada_testfile foo
|
|
|
| -file mkdir ${objdir}/${subdir}/${testdir}
|
| if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
|
| return -1
|
| }
|
| @@ -42,13 +38,10 @@ proc test_gdb_complete { expr expected_output } {
|
| }
|
|
|
| # A convenience function that verifies that the "complete EXPR" command
|
| -# does not genearte any output.
|
| +# does not generate any output.
|
|
|
| proc test_gdb_no_completion { expr } {
|
| - # FIXME: brobecker/2007-12-27: How do you verify that the command
|
| - # output is actually really empty??? For now, the following does
|
| - # not verify this at all:
|
| - test_gdb_complete "$expr" ""
|
| + gdb_test_no_output "complete p $expr"
|
| }
|
|
|
| # A convenience function that joins all the arguments together,
|
| @@ -179,4 +172,19 @@ test_gdb_complete "pck." \
|
| test_gdb_complete "<pck__my" \
|
| "p <pck__my_global_variable>"
|
|
|
| -
|
| +# Very simple completion, but using the interactive form, this time.
|
| +# The verification we are trying to make involves the event loop,
|
| +# and using the "complete" command is not sufficient to reproduce
|
| +# the original problem.
|
| +set test "interactive complete 'print some'"
|
| +send_gdb "print some\t"
|
| +gdb_test_multiple "" "$test" {
|
| + -re "^print some_local_variable $" {
|
| + send_gdb "\n"
|
| + gdb_test_multiple "" "$test" {
|
| + -re " = 1$eol$gdb_prompt $" {
|
| + pass "$test"
|
| + }
|
| + }
|
| + }
|
| +}
|
|
|