]> git.ipfire.org Git - thirdparty/vim.git/commit
patch 9.1.1052: tests: off-by-one error in CheckCWD in test_debugger.vim v9.1.1052
authorYee Cheng Chin <ychin.git@gmail.com>
Sat, 25 Jan 2025 14:14:06 +0000 (15:14 +0100)
committerChristian Brabandt <cb@256bit.org>
Sat, 25 Jan 2025 14:14:06 +0000 (15:14 +0100)
commit3acfbb4b548f4b1659ff1368a1b626cdd263acbe
treefbfaf6eb4e321f9f0b33f83d4df18ded1d5a7739
parent08ea2e1fb05b7a64557cc29ad3fa47ea7f23ea57
patch 9.1.1052: tests: off-by-one error in CheckCWD in test_debugger.vim

Problem:  tests: off-by-one error in CheckCWD in test_debugger.vim
Solution: Fix off-by-one in CheckCWD leading to local tests failure
          (Yee Cheng Chin)

Vim's test_debugger's Test_debug_backtrace_level test will fail if you
happen to run it in a Vim repository with full path of directory being
exactly 29 characters (e.g. `/Users/bob/developing/src/vim`). The test
does term dump comparison and the printout will overflow if the CWD is
too long. It does have a function to skip to test if it detects that but
it's off by one leading to this one situation where it will fail.

The reason why the logic didn't account for this is that Vim's message
printing will overflow the text if it prints a message at exactly the
width of the terminal. This could be considered a bug / quirk but that
will be another issue.

closes: #16517

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_debugger.vim
src/version.c