diff options
author | Raphael <glephunter@gmail.com> | 2023-11-18 12:26:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-18 12:26:52 +0800 |
commit | cdc8bacc7945da816738e330555fa85d3ffffd56 (patch) | |
tree | bb7dd7d69754a37821b2bb3e72250e19266795f0 /test | |
parent | abac33605fb50d55fc796229f0812c246bf635d2 (diff) | |
download | rneovim-cdc8bacc7945da816738e330555fa85d3ffffd56.tar.gz rneovim-cdc8bacc7945da816738e330555fa85d3ffffd56.tar.bz2 rneovim-cdc8bacc7945da816738e330555fa85d3ffffd56.zip |
fix(completion): filter results with complete+=f (#26029)
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/editor/completion_spec.lua | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/test/functional/editor/completion_spec.lua b/test/functional/editor/completion_spec.lua index 51f30543e3..cbaf401f06 100644 --- a/test/functional/editor/completion_spec.lua +++ b/test/functional/editor/completion_spec.lua @@ -1231,25 +1231,30 @@ describe('completion', function() it('complete with f flag #25598', function() screen:try_resize(20, 9) - local bufname = 'foo/bar.txt' - local hidden = 'fooA/.hidden' - if helpers.is_os('win') then - bufname = 'C:\\foo\\bar.txt' - hidden = 'C:\\fooA\\.hidden' - end - command('set complete+=f | edit '..bufname..' | edit '..hidden..' | enew') + command('set complete+=f | edit foo | edit bar |edit foa |edit .hidden') feed('i<C-n>') - screen:expect{grid=[[ foo^ | {2:foo }{0: }| {1:bar }{0: }| - {1:txt }{0: }| - {1:fooA }{0: }| + {1:foa }{0: }| {1:.hidden }{0: }| {0:~ }| {0:~ }| - {3:-- }{4:match 1 of 5} | + {0:~ }| + {3:-- }{4:match 1 of 4} | + ]]} + feed('<Esc>ccf<C-n>') + screen:expect{grid=[[ + foo^ | + {2:foo }{0: }| + {1:foa }{0: }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {0:~ }| + {3:-- }{4:match 1 of 2} | ]]} end) end) |