* gdb.base/finish.exp: Test that "fin" works as an abbreviation
authorJoel Brobecker <brobecker@gnat.com>
Wed, 21 May 2008 17:55:22 +0000 (17:55 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Wed, 21 May 2008 17:55:22 +0000 (17:55 +0000)
        of the "finish" command.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/finish.exp

index d34bac4b8f8032ec0957faaa1ca1e4e6fb801236..3c5f4ec28d1be7eeb4d336407ef5d9bea940c289 100644 (file)
@@ -1,3 +1,8 @@
+2008-05-20  Joel Brobecker  <brobecker@adacore.com>
+
+       * gdb.base/finish.exp: Test that "fin" works as an abbreviation
+       of the "finish" command.
+
 2008-05-21  Nick Roberts  <nickrob@snap.net.nz>
 
        * gdb.base/annota1.exp: Test for new annotation.
index ccde9f0680e9a756728d3769e30bbb24c14e3f27..66545e03f2bfcebfb7bddf17db6f858f1f3ae34a 100644 (file)
@@ -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.