| Index: gdb/testsuite/gdb.base/set-noassign.exp
|
| diff --git a/gdb/testsuite/gdb.cp/pr10687.exp b/gdb/testsuite/gdb.base/set-noassign.exp
|
| similarity index 63%
|
| copy from gdb/testsuite/gdb.cp/pr10687.exp
|
| copy to gdb/testsuite/gdb.base/set-noassign.exp
|
| index f7e60889c2a81069cadd5f99dd15b389f9b3b891..5eba8704aae3ada6da9c33f18aaa13c3d37ce13d 100644
|
| --- a/gdb/testsuite/gdb.cp/pr10687.exp
|
| +++ b/gdb/testsuite/gdb.base/set-noassign.exp
|
| @@ -1,4 +1,4 @@
|
| -#Copyright 2010-2012 Free Software Foundation, Inc.
|
| +# Copyright 2012 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
|
| @@ -13,19 +13,20 @@
|
| # You should have received a copy of the GNU General Public License
|
| # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
| -set testfile pr10687
|
| -set srcfile ${testfile}.cc
|
| -if [prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}] {
|
| +
|
| +if { [prepare_for_testing set-noassign.exp "set-noassign" start.c {debug nowarnings}] } {
|
| return -1
|
| }
|
|
|
| if ![runto_main] then {
|
| fail "Can't run to main"
|
| - return
|
| + return 0
|
| }
|
|
|
| -gdb_breakpoint [gdb_get_line_number "marker"]
|
| -gdb_continue_to_breakpoint "marker"
|
| -
|
| -gdb_test "p a" "{static axis = {{static axis = <same as static member of an already.*"
|
| +# Verify that set command without assignment emits a warning.
|
| +#
|
| +gdb_test "set language ada" ".*" "set language ada"
|
|
|
| +gdb_test "set x=3" \
|
| + "warning: Expression is not an assignment \\(and might have no effect\\)" \
|
| + "warning for set without assignment"
|
|
|