[gdb/testsuite] Stabilize gdb-caching-proc.exp test order
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / finish.exp
index 35294ccb6e30697e99f50302d9abf87090974852..56f3c10e3f087c170c416c9fbc57500f62c9f065 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2000-2016 Free Software Foundation, Inc.
+# Copyright 2000-2019 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
@@ -18,7 +18,7 @@
 set skip_float_test [gdb_skip_float_test]
 
 # re-use the program from the "return2" test.
-if { [prepare_for_testing finish.exp finish return2.c] } {
+if { [prepare_for_testing "failed to prepare" finish return2.c] } {
     return -1
 }
 
@@ -86,6 +86,21 @@ proc finish_abbreviation { abbrev } {
              "Testing the \"$abbrev\" abbreviation for \"finish\""
 }
 
+# Test "set print finish off".
+proc finish_no_print {} {
+    global decimal
+
+    if {![runto "int_func"]} {
+       untested "couldn't run to main"
+       return
+    }
+    gdb_test_no_output "set print finish off"
+    gdb_test "finish" \
+       "Value returned is \\\$$decimal = <not displayed>"
+    gdb_test "print \$" " = 1" \
+       "Ensure return value was properly saved"
+}
+
 proc finish_tests { } {
     global gdb_prompt skip_float_test
 
@@ -105,6 +120,7 @@ proc finish_tests { } {
        finish_1 "double"
     }
     finish_abbreviation "fin"
+    finish_no_print
 }
 
 set prev_timeout $timeout
This page took 0.025182 seconds and 4 git commands to generate.