Patch 8.0.0111
Problem: The :history command is not tested.
Solution: Add tests. (Dominique Pelle)
Files: runtime/doc/cmdline.txt, src/testdir/test_history.vim
*** ../vim-8.0.0110/runtime/doc/cmdline.txt 2016-09-12 12:45:25.000000000
+0200
--- runtime/doc/cmdline.txt 2016-12-01 17:56:02.967807544 +0100
***************
*** 358,365 ****
List entries 6 to 12 from the search history: >
:history / 6,12
<
! List the recent five entries from all histories: >
! :history all -5,
:keepp[atterns] {command} *:keepp* *:keeppatterns*
Execute {command}, without adding anything to the search
--- 359,369 ----
List entries 6 to 12 from the search history: >
:history / 6,12
<
! List the penultimate entry from all histories: >
! :history all -2
! <
! List the most recent two entries from all histories: >
! :history all -2,
:keepp[atterns] {command} *:keepp* *:keeppatterns*
Execute {command}, without adding anything to the search
*** ../vim-8.0.0110/src/testdir/test_history.vim 2016-03-05
20:59:45.000000000 +0100
--- src/testdir/test_history.vim 2016-12-01 17:56:02.967807544 +0100
***************
*** 31,36 ****
--- 31,60 ----
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)
*** ../vim-8.0.0110/src/version.c 2016-12-01 17:48:24.914803033 +0100
--- src/version.c 2016-12-01 17:56:32.831612262 +0100
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 111,
/**/
--
hundred-and-one symptoms of being an internet addict:
70. ISDN lines are added to your house on a hourly basis
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.