From 9fe472c91b7f05be3ab5f5e0a459e303fa0eacc7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 17 Nov 2018 08:18:01 -0500 Subject: vim-patch:8.1.0258: not enough testing for the CompleteDone event Problem: Not enough testing for the CompleteDone event. Solution: Add a test. (closes vim/vim#3297) https://github.com/vim/vim/commit/af559d2c9f44bc88a7d94f9236b3c024563a8e73 --- src/nvim/testdir/test_ins_complete.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_ins_complete.vim b/src/nvim/testdir/test_ins_complete.vim index 5ff63e58ba..d3429617d0 100644 --- a/src/nvim/testdir/test_ins_complete.vim +++ b/src/nvim/testdir/test_ins_complete.vim @@ -142,6 +142,19 @@ function Test_CompleteDoneDict() au! CompleteDone endfunc +func Test_CompleteDone_undo() + au CompleteDone * call append(0, "prepend1") + new + call setline(1, ["line1", "line2"]) + call feedkeys("Go\\\\", "tx") + call assert_equal(["prepend1", "line1", "line2", "line1", ""], + \ getline(1, '$')) + undo + call assert_equal(["line1", "line2"], getline(1, '$')) + bwipe! + au! CompleteDone +endfunc + function! s:CompleteDone_CompleteFuncDictNoUserData( findstart, base ) if a:findstart return 0 -- cgit From a9ae5bf36b9a742e99e0945df0a0c6e473de1bf3 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 17 Nov 2018 22:20:44 -0500 Subject: vim-patch:8.1.0298: window resize test sometimes fails on Mac Problem: Window resize test sometimes fails on Mac. Solution: Add Test_popup_and_window_resize() to flaky tests. https://github.com/vim/vim/commit/46fad2ef0bd5124f1be22c807214c243fb5611d8 --- src/nvim/testdir/runtest.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 99b2b940d7..8e9ee0494d 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -245,6 +245,7 @@ let s:flaky = [ \ 'Test_oneshot()', \ 'Test_out_cb()', \ 'Test_paused()', + \ 'Test_popup_and_window_resize()', " sometimes fails on Mac \ 'Test_quoteplus()', \ 'Test_quotestar()', \ 'Test_reltime()', -- cgit From 2b7e58cb2c59d6ad6f548b00abd85f396a8a244f Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 17 Nov 2018 22:23:04 -0500 Subject: vim-patch:8.1.0299: misplaced comment Problem: misplaced comment Solution: Remove comment https://github.com/vim/vim/commit/142ae736d984f4575c1c6ec1a4f679ae4ddf9413 --- src/nvim/testdir/runtest.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 8e9ee0494d..4fe7db135b 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -245,7 +245,7 @@ let s:flaky = [ \ 'Test_oneshot()', \ 'Test_out_cb()', \ 'Test_paused()', - \ 'Test_popup_and_window_resize()', " sometimes fails on Mac + \ 'Test_popup_and_window_resize()', \ 'Test_quoteplus()', \ 'Test_quotestar()', \ 'Test_reltime()', -- cgit From eab181a74e8534974f6cc887bae9b65fddcfe25e Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 17 Nov 2018 22:37:31 -0500 Subject: vim-patch:8.1.0318: the getftype() test may fail for char devices Problem: The getftype() test may fail for char devices if the file disappeared in between the listing and the getftype() call. Solution: Ignore empty result. (Ozaki Kiichi, closes vim/vim#3360) https://github.com/vim/vim/commit/3b3a506f57a397d83db361be35189c591bff10fb --- src/nvim/testdir/test_stat.vim | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_stat.vim b/src/nvim/testdir/test_stat.vim index c276df0a92..74b76d668e 100644 --- a/src/nvim/testdir/test_stat.vim +++ b/src/nvim/testdir/test_stat.vim @@ -141,17 +141,29 @@ func Test_getftype() endif for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null') - call assert_equal('cdev', getftype(cdevfile)) + let type = getftype(cdevfile) + " ignore empty result, can happen if the file disappeared + if type != '' + call assert_equal('cdev', type) + endif endfor for bdevfile in systemlist('find /dev -type b -maxdepth 2 2>/dev/null') - call assert_equal('bdev', getftype(bdevfile)) + let type = getftype(bdevfile) + " ignore empty result, can happen if the file disappeared + if type != '' + call assert_equal('bdev', type) + endif endfor " The /run/ directory typically contains socket files. " If it does not, test won't fail but will not test socket files. for socketfile in systemlist('find /run -type s -maxdepth 2 2>/dev/null') - call assert_equal('socket', getftype(socketfile)) + let type = getftype(socketfile) + " ignore empty result, can happen if the file disappeared + if type != '' + call assert_equal('socket', type) + endif endfor " TODO: file type 'other' is not tested. How can we test it? -- cgit