annotate src/testdir/test_escaped_glob.vim @ 34682:a36144b38683 v9.1.0222

patch 9.1.0222: missing 'below' virt text if truncation precedes after/right text Commit: https://github.com/vim/vim/commit/fe0a76b2bca12b13982ad66bafadc0d6c1681d00 Author: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Date: Thu Mar 28 11:47:32 2024 +0100 patch 9.1.0222: missing 'below' virt text if truncation precedes after/right text Problem: When a line is truncated just before 'after'/'right' virtual text and the line also has 'below' virtual text, then the 'below' virtual text would not be displayed, depending on the order these text properties were added. Solution: In the loop to make text properties active, skip instead of break for 'after'/'right' virtual text properties that are ignored due to truncation, so following 'below' text properties can still be made active. Similarly, a loop is needed to determine if a text property follows at the end of the screen. (Dylan Thacker-Smith) related: #14307 Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Mar 2024 12:00:04 +0100
parents 08940efa6b4e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11651
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test whether glob()/globpath() return correct results with certain escaped
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " characters.
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20003
diff changeset
4 source check.vim
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20003
diff changeset
5
20003
e373843e2980 patch 8.2.0557: no IPv6 support for channels
Bram Moolenaar <Bram@vim.org>
parents: 17912
diff changeset
6 func SetUp()
11651
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 " consistent sorting of file names
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 set nofileignorecase
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 endfunction
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 function Test_glob()
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20003
diff changeset
12 " This test fails on Windows because of the special characters in the
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20003
diff changeset
13 " filenames. Disable the test on non-Unix systems for now.
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20003
diff changeset
14 CheckUnix
14929
b1df7f99efb7 patch 8.1.0476: memory leaks in test_escaped_glob
Bram Moolenaar <Bram@vim.org>
parents: 13002
diff changeset
15
b1df7f99efb7 patch 8.1.0476: memory leaks in test_escaped_glob
Bram Moolenaar <Bram@vim.org>
parents: 13002
diff changeset
16 " Execute these commands in the sandbox, so that using the shell fails.
b1df7f99efb7 patch 8.1.0476: memory leaks in test_escaped_glob
Bram Moolenaar <Bram@vim.org>
parents: 13002
diff changeset
17 " Setting 'shell' to an invalid name causes a memory leak.
b1df7f99efb7 patch 8.1.0476: memory leaks in test_escaped_glob
Bram Moolenaar <Bram@vim.org>
parents: 13002
diff changeset
18 sandbox call assert_equal("", glob('Xxx\{'))
17912
9fac6d0de69a patch 8.1.1952: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 16277
diff changeset
19 sandbox call assert_equal("", 'Xxx\$'->glob())
16277
5ef25fa57f71 patch 8.1.1143: may pass weird strings to file name expansion
Bram Moolenaar <Bram@vim.org>
parents: 14929
diff changeset
20 w! Xxx\{
11651
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 w! Xxx\$
14929
b1df7f99efb7 patch 8.1.0476: memory leaks in test_escaped_glob
Bram Moolenaar <Bram@vim.org>
parents: 13002
diff changeset
22 sandbox call assert_equal("Xxx{", glob('Xxx\{'))
b1df7f99efb7 patch 8.1.0476: memory leaks in test_escaped_glob
Bram Moolenaar <Bram@vim.org>
parents: 13002
diff changeset
23 sandbox call assert_equal("Xxx$", glob('Xxx\$'))
12899
9e04de2aa738 patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11651
diff changeset
24 call delete('Xxx{')
9e04de2aa738 patch 8.0.1326: largefile test fails on CI, glob test on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 11651
diff changeset
25 call delete('Xxx$')
11651
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 endfunction
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 function Test_globpath()
14929
b1df7f99efb7 patch 8.1.0476: memory leaks in test_escaped_glob
Bram Moolenaar <Bram@vim.org>
parents: 13002
diff changeset
29 sandbox call assert_equal("sautest/autoload/globone.vim\nsautest/autoload/globtwo.vim",
13002
f7b2ecaeb79c patch 8.0.1377: cannot call a dict function in autoloaded dict
Christian Brabandt <cb@256bit.org>
parents: 12899
diff changeset
30 \ globpath('sautest/autoload', 'glob*.vim'))
14929
b1df7f99efb7 patch 8.1.0476: memory leaks in test_escaped_glob
Bram Moolenaar <Bram@vim.org>
parents: 13002
diff changeset
31 sandbox call assert_equal(['sautest/autoload/globone.vim', 'sautest/autoload/globtwo.vim'],
17912
9fac6d0de69a patch 8.1.1952: more functions can be used as a method
Bram Moolenaar <Bram@vim.org>
parents: 16277
diff changeset
32 \ 'glob*.vim'->globpath('sautest/autoload', 0, 1))
11651
140d51d5b5c3 patch 8.0.0708: some tests are old style
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 endfunction
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20003
diff changeset
34
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 20003
diff changeset
35 " vim: shiftwidth=2 sts=2 expandtab