summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_autocmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-05-12 13:07:14 +0200
committerBram Moolenaar <Bram@vim.org>2019-05-12 13:07:14 +0200
commit97b0075b0d733cc58c29247b09e7887b9991d7bf (patch)
tree8e42ed9ad0b1918e6cfd63b56f10221e0b13b05e /src/testdir/test_autocmd.vim
parentb73fbc76c6fc446da90dd2cdac620155e37e5514 (diff)
patch 8.1.1325: cannot build with +eval but without +channel and +timersv8.1.1325
Problem: Cannot build with +eval but without +channel and +timers. (John Marriott) Solution: Adjust #ifdef for get_callback().
Diffstat (limited to 'src/testdir/test_autocmd.vim')
-rw-r--r--src/testdir/test_autocmd.vim48
1 files changed, 25 insertions, 23 deletions
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 48db3e2a99..b22718aee6 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -18,6 +18,7 @@ func Test_vim_did_enter()
endfunc
if has('timers')
+
func ExitInsertMode(id)
call feedkeys("\<Esc>")
endfunc
@@ -70,7 +71,30 @@ if has('timers')
au! CursorHoldI
set updatetime&
endfunc
-endif
+
+ func Test_OptionSet_modeline()
+ call test_override('starting', 1)
+ au! OptionSet
+ augroup set_tabstop
+ au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
+ augroup END
+ call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
+ set modeline
+ let v:errmsg = ''
+ call assert_fails('split XoptionsetModeline', 'E12:')
+ call assert_equal(7, &ts)
+ call assert_equal('', v:errmsg)
+
+ augroup set_tabstop
+ au!
+ augroup END
+ bwipe!
+ set ts&
+ call delete('XoptionsetModeline')
+ call test_override('starting', 0)
+ endfunc
+
+endif "has('timers')
func Test_bufunload()
augroup test_bufunload_group
@@ -673,28 +697,6 @@ func Test_OptionSet_diffmode_close()
"delfunc! AutoCommandOptionSet
endfunc
-func Test_OptionSet_modeline()
- call test_override('starting', 1)
- au! OptionSet
- augroup set_tabstop
- au OptionSet tabstop call timer_start(1, {-> execute("echo 'Handler called'", "")})
- augroup END
- call writefile(['vim: set ts=7 sw=5 :', 'something'], 'XoptionsetModeline')
- set modeline
- let v:errmsg = ''
- call assert_fails('split XoptionsetModeline', 'E12:')
- call assert_equal(7, &ts)
- call assert_equal('', v:errmsg)
-
- augroup set_tabstop
- au!
- augroup END
- bwipe!
- set ts&
- call delete('XoptionsetModeline')
- call test_override('starting', 0)
-endfunc
-
" Test for Bufleave autocommand that deletes the buffer we are about to edit.
func Test_BufleaveWithDelete()
new | edit Xfile1