Mercurial > vim
diff src/testdir/test_filter_cmd.vim @ 16433:9c206a78ec04 v8.1.1221
patch 8.1.1221: filtering does not work when listing marks
commit https://github.com/vim/vim/commit/ad6dc49a7564a99fca36c1928e3865787d3bd5b2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 27 22:40:08 2019 +0200
patch 8.1.1221: filtering does not work when listing marks
Problem: Filtering does not work when listing marks.
Solution: Implement filtering marks. (Marcin Szamotulski, closes https://github.com/vim/vim/issues/3895)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 27 Apr 2019 22:45:05 +0200 |
parents | 5b06b642fbee |
children | b912277e3877 |
line wrap: on
line diff
--- a/src/testdir/test_filter_cmd.vim +++ b/src/testdir/test_filter_cmd.vim @@ -126,7 +126,22 @@ func Test_filter_commands() let res = split(execute("filter /\.c$/ jumps"), "\n")[1:] call assert_equal([" 2 1 0 file.c", ">"], res) - bwipe file.c - bwipe file.h - bwipe file.hs + " Test filtering :marks command + b file.c + mark A + b file.h + mark B + let res = split(execute("filter /\.c$/ marks"), "\n")[1:] + call assert_equal([" A 1 0 file.c"], res) + + call setline(1, ['one', 'two', 'three']) + 1mark a + 2mark b + 3mark c + let res = split(execute("filter /two/ marks abc"), "\n")[1:] + call assert_equal([" b 2 0 two"], res) + + bwipe! file.c + bwipe! file.h + bwipe! file.hs endfunc