Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: gdb/testsuite/gdb.ada/complete.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.ada/char_param/pck.ads ('k') | gdb/testsuite/gdb.ada/complete/foo.adb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
+ }
+ }
+ }
+}
« no previous file with comments | « gdb/testsuite/gdb.ada/char_param/pck.ads ('k') | gdb/testsuite/gdb.ada/complete/foo.adb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698