From 3ffeceb851b135a1eb77287af12bb6fbfaf8d175 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 11 Feb 2018 20:32:23 +0100 Subject: [PATCH] vim-patch:8.0.1226: edit and popup tests failing Problem: Edit and popup tests failing. Solution: Make the tests pass. https://github.com/vim/vim/commit/2a45d64d0a7ab28d77eee277244e76dbbf8c2db8 --- src/nvim/testdir/test_edit.vim | 4 +++- src/nvim/testdir/test_popup.vim | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 0c54becde8..1bcd245d01 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -216,14 +216,16 @@ endfunc func! Test_edit_08() throw 'skipped: moved to test/functional/legacy/edit_spec.lua' " reset insertmode from i_ctrl-r_= + let g:bufnr = bufnr('%') new call setline(1, ['abc']) call cursor(1, 4) - call feedkeys(":set im\ZZZ\=setbufvar(1,'&im', 0)\",'tnix') + call feedkeys(":set im\ZZZ\=setbufvar(g:bufnr,'&im', 0)\",'tnix') call assert_equal(['abZZZc'], getline(1,'$')) call assert_equal([0, 1, 1, 0], getpos('.')) call assert_false(0, '&im') bw! + unlet g:bufnr endfunc func! Test_edit_09() diff --git a/src/nvim/testdir/test_popup.vim b/src/nvim/testdir/test_popup.vim index 7f818dd40d..f5bdd717dd 100644 --- a/src/nvim/testdir/test_popup.vim +++ b/src/nvim/testdir/test_popup.vim @@ -590,7 +590,8 @@ func Test_popup_and_preview_autocommand() call setline(2, ' os.') $ call feedkeys("A\\\\\\\", 'tx') - call assert_equal(["import os", " os.EX_IOERR", ''], getline(1,'$')) + call assert_equal("import os", getline(1)) + call assert_match(' os.\(EX_IOERR\|O_CREAT\)$', getline(2)) call assert_equal(1, winnr('$')) " previewwindow option is not set call assert_equal(0, &previewwindow)