diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-11-07 07:58:37 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-07 07:58:37 +0800 |
| commit | 9b9f84bc62a01ed76b9f53119781816bd3375267 (patch) | |
| tree | c1c6e5463d515ddc174ca71554d1203f29983c28 /src/nvim/testdir/test_cmdline.vim | |
| parent | 3b3611a3d0f1e13e277360d6bacf97a0fb7eb6de (diff) | |
| parent | 7e1d9c560b09cacb78b2fc8f9428a77d6fca66e1 (diff) | |
| download | rneovim-9b9f84bc62a01ed76b9f53119781816bd3375267.tar.gz rneovim-9b9f84bc62a01ed76b9f53119781816bd3375267.tar.bz2 rneovim-9b9f84bc62a01ed76b9f53119781816bd3375267.zip | |
Merge pull request #20982 from zeertzjq/vim-8.2.2849
vim-patch:8.2.{2849,2856,2873}: buffer writing tests
Diffstat (limited to 'src/nvim/testdir/test_cmdline.vim')
| -rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index 7cef3117c2..b0be7ab396 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -1513,6 +1513,7 @@ func Test_cmdline_expand_special() call assert_fails('e <afile>', 'E495:') call assert_fails('e <abuf>', 'E496:') call assert_fails('e <amatch>', 'E497:') + call writefile([], 'Xfile.cpp') call writefile([], 'Xfile.java') new Xfile.cpp @@ -2006,6 +2007,26 @@ func Test_recalling_cmdline() cunmap <Plug>(save-cmdline) endfunc +" Test for the 'suffixes' option +func Test_suffixes_opt() + call writefile([], 'Xfile') + call writefile([], 'Xfile.c') + call writefile([], 'Xfile.o') + set suffixes= + call feedkeys(":e Xfi*\<C-A>\<C-B>\"\<CR>", 'xt') + call assert_equal('"e Xfile Xfile.c Xfile.o', @:) + set suffixes=.c + call feedkeys(":e Xfi*\<C-A>\<C-B>\"\<CR>", 'xt') + call assert_equal('"e Xfile Xfile.o Xfile.c', @:) + set suffixes=,, + call feedkeys(":e Xfi*\<C-A>\<C-B>\"\<CR>", 'xt') + call assert_equal('"e Xfile.c Xfile.o Xfile', @:) + set suffixes& + call delete('Xfile') + call delete('Xfile.c') + call delete('Xfile.o') +endfunc + " Test for using a popup menu for the command line completion matches " (wildoptions=pum) func Test_wildmenu_pum() |