Blame SOURCES/gdb-6.3-focus-cmd-prev-test.patch

ed07ac
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
ed07ac
From: Fedora GDB patches <invalid@email.com>
ed07ac
Date: Fri, 27 Oct 2017 21:07:50 +0200
ed07ac
Subject: gdb-6.3-focus-cmd-prev-test.patch
ed07ac
ed07ac
;; Test a crash on `focus cmd', `focus prev' commands.
ed07ac
;;=fedoratest
ed07ac
ed07ac
diff --git a/gdb/testsuite/gdb.base/focus-cmd-prev.exp b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
ed07ac
new file mode 100644
ed07ac
--- /dev/null
ed07ac
+++ b/gdb/testsuite/gdb.base/focus-cmd-prev.exp
ed07ac
@@ -0,0 +1,40 @@
ed07ac
+# Copyright 2008 Free Software Foundation, Inc.
ed07ac
+
ed07ac
+# This program is free software; you can redistribute it and/or modify
ed07ac
+# it under the terms of the GNU General Public License as published by
ed07ac
+# the Free Software Foundation; either version 2 of the License, or
ed07ac
+# (at your option) any later version.
ed07ac
+#
ed07ac
+# This program is distributed in the hope that it will be useful,
ed07ac
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
ed07ac
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
ed07ac
+# GNU General Public License for more details.
ed07ac
+#
ed07ac
+# You should have received a copy of the GNU General Public License
ed07ac
+# along with this program; if not, write to the Free Software
ed07ac
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
ed07ac
+
ed07ac
+if $tracelevel then {
ed07ac
+    strace $tracelevel
ed07ac
+}
ed07ac
+
ed07ac
+gdb_exit
ed07ac
+gdb_start
ed07ac
+
ed07ac
+# Do not use gdb_test or \r\n there since:
ed07ac
+# commit d7e747318f4d04af033f16325f9b6d74f67079ec
ed07ac
+#     Eliminate make_cleanup_ui_file_delete / make ui_file a class hierarchy
ed07ac
+
ed07ac
+set test "focus cmd"
ed07ac
+gdb_test_multiple $test $test {
ed07ac
+    -re "$gdb_prompt $" {
ed07ac
+	pass $test
ed07ac
+    }
ed07ac
+}
ed07ac
+
ed07ac
+set test "focus prev"
ed07ac
+gdb_test_multiple $test $test {
ed07ac
+    -re "$gdb_prompt $" {
ed07ac
+	pass $test
ed07ac
+    }
ed07ac
+}