aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-08-14 02:17:05 +0200
committerGitHub <noreply@github.com>2018-08-14 02:17:05 +0200
commitbec5e4cb6183f3b403aca35ef55c3798a48dc64b (patch)
tree42553f509890440cf88995ed38c6c14e162bf33b /src/nvim/testdir
parentee5cc88a73401e4352660862631117c8319950f7 (diff)
parentc6dd84e00b2860bb906d5fd61b8414620714594d (diff)
downloadrneovim-bec5e4cb6183f3b403aca35ef55c3798a48dc64b.tar.gz
rneovim-bec5e4cb6183f3b403aca35ef55c3798a48dc64b.tar.bz2
rneovim-bec5e4cb6183f3b403aca35ef55c3798a48dc64b.zip
Merge #8832 from eraserhd/vim-insert-setline-undo-fixes
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_autocmd.vim26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
index 772b3f721c..e4ab3ccea8 100644
--- a/src/nvim/testdir/test_autocmd.vim
+++ b/src/nvim/testdir/test_autocmd.vim
@@ -567,7 +567,7 @@ func Test_OptionSet()
" Cleanup
au! OptionSet
for opt in ['nu', 'ai', 'acd', 'ar', 'bs', 'backup', 'cul', 'cp']
- exe printf(":set %s&vi", opt)
+ exe printf(":set %s&vim", opt)
endfor
call test_override('starting', 0)
delfunc! AutoCommandOptionSet
@@ -1221,3 +1221,27 @@ func Test_ChangedP()
bw!
endfunc
+
+let g:setline_handled = v:false
+func! SetLineOne()
+ if !g:setline_handled
+ call setline(1, "(x)")
+ let g:setline_handled = v:true
+ endif
+endfunc
+
+func Test_TextChangedI_with_setline()
+ throw 'skipped: Nvim does not support test_override()'
+ new
+ call test_override('char_avail', 1)
+ autocmd TextChangedI <buffer> call SetLineOne()
+ call feedkeys("i(\<CR>\<Esc>", 'tx')
+ call assert_equal('(', getline(1))
+ call assert_equal('x)', getline(2))
+ undo
+ call assert_equal('', getline(1))
+ call assert_equal('', getline(2))
+
+ call test_override('starting', 0)
+ bwipe!
+endfunc