summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_history.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-31 21:17:39 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-31 21:17:39 +0200
commitf9f24ce7a0e5988fedf2e2ff751818f9b07510a6 (patch)
treeaf3ede78a2dedfa82536fb134d22dbe6c9a5033c /src/testdir/test_history.vim
parent5d69fdb7c4b91faf2d92b8d449cc9460f3035fb3 (diff)
patch 8.1.1953: more functions can be used as a methodv8.1.1953
Problem: More functions can be used as a method. Solution: Allow more functions to be used as a method.
Diffstat (limited to 'src/testdir/test_history.vim')
-rw-r--r--src/testdir/test_history.vim8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testdir/test_history.vim b/src/testdir/test_history.vim
index 215fc0a55a..2d53474bb3 100644
--- 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)