diff src/testdir/test_history.vim @ 17914:af3d441845cd v8.1.1953

patch 8.1.1953: more functions can be used as a method Commit: https://github.com/vim/vim/commit/f9f24ce7a0e5988fedf2e2ff751818f9b07510a6 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 31 21:17:39 2019 +0200 patch 8.1.1953: more functions can be used as a method Problem: More functions can be used as a method. Solution: Allow more functions to be used as a method.
author Bram Moolenaar <Bram@vim.org>
date Sat, 31 Aug 2019 21:30:04 +0200
parents 8e9e9124c7a2
children 738a4fe2c8c5
line wrap: on
line diff
--- a/src/testdir/test_history.vim
+++ b/src/testdir/test_history.vim
@@ -12,7 +12,7 @@ function History_Tests(hist)
   call assert_equal(-1, histnr(a:hist))
   call assert_equal('', histget(a:hist))
 
-  call assert_true(histadd(a:hist, 'ls'))
+  call assert_true('ls'->histadd(a:hist))
   call assert_true(histadd(a:hist, 'buffers'))
   call assert_equal('buffers', histget(a:hist))
   call assert_equal('ls', histget(a:hist, -2))
@@ -21,14 +21,14 @@ function History_Tests(hist)
   call assert_equal('', histget(a:hist, -5))
   call assert_equal(2, histnr(a:hist))
   call assert_true(histdel(a:hist, 2))
-  call assert_false(histdel(a:hist, 7))
+  call assert_false(a:hist->histdel(7))
   call assert_equal(1, histnr(a:hist))
   call assert_equal('ls', histget(a:hist, -1))
 
   call assert_true(histadd(a:hist, 'buffers'))
   call assert_true(histadd(a:hist, 'ls'))
-  call assert_equal('ls', histget(a:hist, -1))
-  call assert_equal(4, histnr(a:hist))
+  call assert_equal('ls', a:hist->histget(-1))
+  call assert_equal(4, a:hist->histnr())
 
   let a=execute('history ' . a:hist)
   call assert_match("^\n      #  \\S* history\n      3  buffers\n>     4  ls$", a)