]> granicus.if.org Git - vim/commitdiff
patch 8.1.1764: ":browse oldfiles" is not tested v8.1.1764
authorBram Moolenaar <Bram@vim.org>
Sat, 27 Jul 2019 21:27:51 +0000 (23:27 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 27 Jul 2019 21:27:51 +0000 (23:27 +0200)
Problem:    ":browse oldfiles" is not tested.
Solution:   Add a test.

src/testdir/test_viminfo.vim
src/version.c

index 8206458d9ea2f3f9687e166353b5f3a4b3af564b..306f54d602d7464a670d7c3988f333a143ba5145 100644 (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'], 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/'}))
+
+  new
+  call feedkeys("3\<CR>", 't')
+  browse oldfiles
+  call assert_equal("/tmp/another.txt", expand("%"))
+  bwipe
 endfunc
index da62479b1cc09a904e0160a5fc6c0899ee5c4376..6619c7b263a8789cc7d1dde262d2ad994b541722 100644 (file)
@@ -777,6 +777,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1764,
 /**/
     1763,
 /**/