From 5943254b565979c5d7152b2fa7f2012e80499682 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Wed, 21 May 2008 17:55:22 +0000 Subject: [PATCH] * gdb.base/finish.exp: Test that "fin" works as an abbreviation of the "finish" command. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/finish.exp | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d34bac4b8f8..3c5f4ec28d1 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-20 Joel Brobecker + + * gdb.base/finish.exp: Test that "fin" works as an abbreviation + of the "finish" command. + 2008-05-21 Nick Roberts * gdb.base/annota1.exp: Test for new annotation. diff --git a/gdb/testsuite/gdb.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp index ccde9f0680e..66545e03f2b 100644 --- a/gdb/testsuite/gdb.base/finish.exp +++ b/gdb/testsuite/gdb.base/finish.exp @@ -97,6 +97,21 @@ proc finish_void { } { } } +# A function that tests that the given ABBREV is a working abbreviation +# of the "finish" command. + +proc finish_abbreviation { abbrev } { + + if { ! [ runto "int_func" ] } then { + fail "running to int_func" + return -1 + } + + gdb_test "$abbrev" \ + "Value returned is .* = 1" \ + "Testing the \"$abbrev\" abbreviation for \"finish\"" +} + proc finish_tests { } { global gdb_prompt @@ -113,6 +128,7 @@ proc finish_tests { } { finish_1 "long_long" finish_1 "float" finish_1 "double" + finish_abbreviation "fin" } # Start with a fresh gdb. -- 2.30.2