diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-08 21:51:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-08 21:51:41 +0200 |
commit | f92e58cadb03156879e9bdbf6341bf662d9c87cc (patch) | |
tree | 13bdd750b1d0c9db7f2267d2300eba24f6560619 /src/testdir/test_timers.vim | |
parent | 7ee80f766130f22598c928415c92ec612a8f18cf (diff) | |
download | vim-git-f92e58cadb03156879e9bdbf6341bf662d9c87cc.tar.gz |
patch 8.1.2013: more functions can be used as methodsv8.1.2013
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method.
Diffstat (limited to 'src/testdir/test_timers.vim')
-rw-r--r-- | src/testdir/test_timers.vim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim index 261be278d..a6a36f793 100644 --- a/src/testdir/test_timers.vim +++ b/src/testdir/test_timers.vim @@ -71,7 +71,7 @@ endfunc func Test_timer_info() let id = timer_start(1000, 'MyHandler') - let info = timer_info(id) + let info = id->timer_info() call assert_equal(id, info[0]['id']) call assert_equal(1000, info[0]['time']) call assert_true(info[0]['remaining'] > 500) @@ -109,7 +109,7 @@ func Test_timer_paused() let info = timer_info(id) call assert_equal(0, info[0]['paused']) - call timer_pause(id, 1) + eval id->timer_pause(1) let info = timer_info(id) call assert_equal(1, info[0]['paused']) sleep 100m @@ -149,7 +149,7 @@ func Test_timer_delete_myself() endfunc func StopTimer1(timer) - let g:timer2 = timer_start(10, 'StopTimer2') + let g:timer2 = 10->timer_start('StopTimer2') " avoid maxfuncdepth error call timer_pause(g:timer1, 1) sleep 20m @@ -262,7 +262,7 @@ func Test_timer_peek_and_get_char() let intr = timer_start(100, 'Interrupt') let c = getchar() call assert_equal(char2nr('a'), c) - call timer_stop(intr) + eval intr->timer_stop() endfunc func Test_timer_getchar_zero() |