1
0
forked from aniani/vim

patch 8.1.1764: ":browse oldfiles" is not tested

Problem:    ":browse oldfiles" is not tested.
Solution:   Add a test.
This commit is contained in:
Bram Moolenaar
2019-07-27 23:27:51 +02:00
parent 9f9fe37f67
commit 5328cb8986
2 changed files with 8 additions and 0 deletions

View File

@@ -537,4 +537,10 @@ func Test_viminfo_oldfiles()
call assert_equal(['1: /tmp/file_one.txt', '2: /tmp/file_two.txt', '3: /tmp/another.txt'], filter(split(execute('oldfiles'), "\n"), {i, v -> v =~ '/tmp/'})) call assert_equal(['1: /tmp/file_one.txt', '2: /tmp/file_two.txt', '3: /tmp/another.txt'], filter(split(execute('oldfiles'), "\n"), {i, v -> v =~ '/tmp/'}))
call assert_equal(['1: /tmp/file_one.txt', '2: /tmp/file_two.txt'], filter(split(execute('filter file_ oldfiles'), "\n"), {i, v -> v =~ '/tmp/'})) call assert_equal(['1: /tmp/file_one.txt', '2: /tmp/file_two.txt'], filter(split(execute('filter file_ oldfiles'), "\n"), {i, v -> v =~ '/tmp/'}))
call assert_equal(['3: /tmp/another.txt'], filter(split(execute('filter /another/ oldfiles'), "\n"), {i, v -> v =~ '/tmp/'})) call assert_equal(['3: /tmp/another.txt'], filter(split(execute('filter /another/ oldfiles'), "\n"), {i, v -> v =~ '/tmp/'}))
new
call feedkeys("3\<CR>", 't')
browse oldfiles
call assert_equal("/tmp/another.txt", expand("%"))
bwipe
endfunc endfunc

View File

@@ -777,6 +777,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1764,
/**/ /**/
1763, 1763,
/**/ /**/