]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog-2014-2021
gdb/testsuite: fix implementation of delete line in tuiterm.exp
authorAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 22 Jan 2021 16:25:15 +0000 (16:25 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 8 Feb 2021 09:51:45 +0000 (09:51 +0000)
commit5fb97639911a4ab55f0287b5deea2f06d83a5f8c
treec983cfd40d8351f71a2b0cbb00fd2d05b81c5377
parentd6f2700b4863f24d8fdab2f549a39a9453b86e93
gdb/testsuite: fix implementation of delete line in tuiterm.exp

The implementation of the delete line escape sequence in tuiterm.exp
was wrong.  Delete should take a count and then delete COUNT lines at
the current cursor location, all remaining lines in the scroll region
are moved up to replace the deleted lines, with blank lines being
added at the end of the scroll region.

It's not clear to me what "scroll region" means here (or at least how
that is defined), but for now I'm just treating the whole screen as
the scroll region, which seems to work fine.

In contrast the current broken implementation deletes COUNT lines at
the cursor location moving the next COUNT lines up to fill the gap.
The rest of the screen is then cleared.

gdb/testsuite/ChangeLog:

* gdb.tui/scroll.exp: New file.
* gdb.tui/tui-layout-asm-short-prog.exp: Update expected results.
* lib/tuiterm.exp (Term::_csi_M): Delete count lines, scroll
remaining lines up.
(Term::check_region_contents): New proc.
(Term::check_box_contents): Use check_region_contents.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.tui/scroll.exp [new file with mode: 0644]
gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp
gdb/testsuite/lib/tuiterm.exp