aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-03-08 00:14:58 +0000
committerPedro Alves <palves@redhat.com>2017-03-08 00:14:58 +0000
commit7cbbff33a502dcba0264a1935840345274b8aee2 (patch)
tree9f62a6851bde882caf506d394d5f2dbb55e97a13 /gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
parent50dbe6e1bc8589db8e900299ef03ce9ead4ef3d7 (diff)
downloadgdb-7cbbff33a502dcba0264a1935840345274b8aee2.zip
gdb-7cbbff33a502dcba0264a1935840345274b8aee2.tar.gz
gdb-7cbbff33a502dcba0264a1935840345274b8aee2.tar.bz2
Move TUI testcases to new gdb/testsuite/gdb.tui/ directory
Let's start putting TUI tests in their own dir. gdb/testsuite/ 2017-03-08 Pedro Alves <palves@redhat.com> * gdb.base/tui-disasm-long-lines.c, gdb.base/tui-disasm-long-lines.exp, gdb.base/tui-layout.c, gdb.base/tui-layout.exp: Move to ... * gdb.tui/: ... this new directory.
Diffstat (limited to 'gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp')
-rw-r--r--gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp43
1 files changed, 43 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp b/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
new file mode 100644
index 0000000..8740ec1
--- /dev/null
+++ b/gdb/testsuite/gdb.tui/tui-disasm-long-lines.exp
@@ -0,0 +1,43 @@
+# Copyright 2010-2017 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that the logic for displaying the TUI disassembly window
+# handles very long lines.
+
+standard_testfile
+
+set ccopts {debug quiet}
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" \
+ executable $ccopts] != "" } {
+ # Maybe the compiler can't handle arbitrarily long identifier names.
+ # Try with a shorter version.
+ lappend ccopts "additional_flags=-DSHORT_IDENTIFIERS"
+ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" \
+ executable $ccopts] != "" } {
+ untested "compile"
+ return -1
+ }
+}
+
+clean_restart "$binfile"
+
+if {[skip_tui_tests]} {
+ # TUI support is disabled. Check for error message.
+ gdb_test "layout asm" "Undefined command: \"layout\". Try \"help\"."
+ return
+}
+
+# Just check the command does not cause gdb to crash.
+gdb_test "layout asm"