aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2017-08-07 05:42:52 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-08-06 23:42:52 +0200
commit2753d61e4cb037323d78ed3fd978a10694c902c6 (patch)
tree32508d91df7b98baeae52288b8cf0aa08b40b80a /src
parent120d1b80c9aa3ad39902310a99f5d19f41ca4bb8 (diff)
downloadrneovim-2753d61e4cb037323d78ed3fd978a10694c902c6.tar.gz
rneovim-2753d61e4cb037323d78ed3fd978a10694c902c6.tar.bz2
rneovim-2753d61e4cb037323d78ed3fd978a10694c902c6.zip
vim-patch:8.0.0111 (#7090)
Problem: The :history command is not tested. Solution: Add tests. (Dominique Pelle) https://github.com/vim/vim/commit/eebd84eb94ed7f59a06a52cb4863563642f58899
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_history.vim24
-rw-r--r--src/nvim/version.c2
2 files changed, 25 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_history.vim b/src/nvim/testdir/test_history.vim
index 3163b344d3..ca31e3f06c 100644
--- a/src/nvim/testdir/test_history.vim
+++ b/src/nvim/testdir/test_history.vim
@@ -31,6 +31,30 @@ function History_Tests(hist)
call assert_equal('ls', histget(a:hist, -1))
call assert_equal(4, histnr(a:hist))
+ let a=execute('history ' . a:hist)
+ call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
+ let a=execute('history all')
+ call assert_match("^\n # .* history\n 3 buffers\n> 4 ls", a)
+
+ if len(a:hist) > 0
+ let a=execute('history ' . a:hist . ' 2')
+ call assert_match("^\n # \\S* history$", a)
+ let a=execute('history ' . a:hist . ' 3')
+ call assert_match("^\n # \\S* history\n 3 buffers$", a)
+ let a=execute('history ' . a:hist . ' 4')
+ call assert_match("^\n # \\S* history\n> 4 ls$", a)
+ let a=execute('history ' . a:hist . ' 3,4')
+ call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
+ let a=execute('history ' . a:hist . ' -1')
+ call assert_match("^\n # \\S* history\n> 4 ls$", a)
+ let a=execute('history ' . a:hist . ' -2')
+ call assert_match("^\n # \\S* history\n 3 buffers$", a)
+ let a=execute('history ' . a:hist . ' -2,')
+ call assert_match("^\n # \\S* history\n 3 buffers\n> 4 ls$", a)
+ let a=execute('history ' . a:hist . ' -3')
+ call assert_match("^\n # \\S* history$", a)
+ endif
+
" Test for removing entries matching a pattern
for i in range(1, 3)
call histadd(a:hist, 'text_' . i)
diff --git a/src/nvim/version.c b/src/nvim/version.c
index d4d2af2f26..1ecda654d1 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -841,7 +841,7 @@ static const int included_patches[] = {
// 114 NA
// 113 NA
// 112,
- // 111,
+ 111,
110,
// 109 NA
// 108 NA