diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-12-01 17:57:44 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-12-01 17:57:44 +0100 |
commit | eebd84eb94ed7f59a06a52cb4863563642f58899 (patch) | |
tree | 4bf2824f76e8a33efed47900b27d3c35f722dc51 /src | |
parent | 5a030a540f4157d5c9905e3564282c92b4dcec9a (diff) |
patch 8.0.0111v8.0.0111
Problem: The :history command is not tested.
Solution: Add tests. (Dominique Pelle)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_history.vim | 24 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/testdir/test_history.vim b/src/testdir/test_history.vim index ee6acfffc3..243ede7517 100644 --- a/src/testdir/test_history.vim +++ b/src/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/version.c b/src/version.c index c9fc5727df..75e1222ac9 100644 --- a/src/version.c +++ b/src/version.c @@ -765,6 +765,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 111, +/**/ 110, /**/ 109, |