"non-integer convenience variable disallowed"
}
-#
# Test that commands can be cleared without error.
-#
-gdb_test "commands\nprint 232323\nend" ">end" "set some breakpoint commands"
-gdb_test "commands\nend" ">end" "clear breakpoint commands"
-# We verify that the commands were cleared by ensuring that the last
-# breakpoint's location ends the output -- if there were commands,
-# they would have been printed after the location.
-gdb_test "info break" "$srcfile:$line_actual" "verify that they were cleared"
+proc_with_prefix test_break_commands_clear {} {
+ clean_restart breako2
+
+ set line [gdb_get_line_number "set breakpoint 1 here"]
+ gdb_breakpoint $line
+
+ gdb_test "commands\nprint 232323\nend" ">end" "set some breakpoint commands"
+ gdb_test "commands\nend" ">end" "clear breakpoint commands"
+
+ # We verify that the commands were cleared by ensuring that the last
+ # breakpoint's location ends the output -- if there were commands,
+ # they would have been printed after the location.
+ gdb_test "info break" "$::srcfile:$::decimal" "verify that they were cleared"
+}
+
+test_break_commands_clear