diff options
| author | James McCoy <jamessan@jamessan.com> | 2017-04-29 07:58:49 -0400 |
|---|---|---|
| committer | James McCoy <jamessan@jamessan.com> | 2017-04-29 23:48:27 -0400 |
| commit | 7bd97127b4e45dcef1159603834b04ef0dcadfd7 (patch) | |
| tree | 650f557edef609d8fa5c764503f0da880e55a07d /src/nvim/testdir | |
| parent | 059c3fc2f952b42824ca37610c040c938a75de5c (diff) | |
| download | rneovim-7bd97127b4e45dcef1159603834b04ef0dcadfd7.tar.gz rneovim-7bd97127b4e45dcef1159603834b04ef0dcadfd7.tar.bz2 rneovim-7bd97127b4e45dcef1159603834b04ef0dcadfd7.zip | |
vim-patch:7.4.2244
Problem: Adding pattern to ":oldfiles" is not a generic solution.
Solution: Add the ":filter /pat/ cmd" command modifier. Only works for some
commands right now.
https://github.com/vim/vim/commit/7b668e83d0635d082b7ec90d7d2aa30a9d7d8928
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_alot.vim | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_filter_cmd.vim | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index 99d9835996..5da9a8b0f4 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -8,6 +8,7 @@ source test_ex_undo.vim source test_expr.vim source test_expr_utf8.vim source test_feedkeys.vim +source test_filter_cmd.vim source test_filter_map.vim source test_goto.vim source test_jumps.vim diff --git a/src/nvim/testdir/test_filter_cmd.vim b/src/nvim/testdir/test_filter_cmd.vim new file mode 100644 index 0000000000..f85a11ce45 --- /dev/null +++ b/src/nvim/testdir/test_filter_cmd.vim @@ -0,0 +1,15 @@ +" Test the :filter command modifier + +func Test_filter() + edit Xdoesnotmatch + edit Xwillmatch + call assert_equal('"Xwillmatch"', substitute(execute('filter willma ls'), '[^"]*\(".*"\)[^"]*', '\1', '')) +endfunc + +func Test_filter_fails() + call assert_fails('filter', 'E471:') + call assert_fails('filter pat', 'E476:') + call assert_fails('filter /pat', 'E476:') + call assert_fails('filter /pat/', 'E476:') + call assert_fails('filter /pat/ asdf', 'E492:') +endfunc |