diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-11-18 12:35:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-11-18 12:35:21 +0100 |
| commit | 00e3ba22fe8c36cd53aa1b398d09b0af1fcbbcb0 (patch) | |
| tree | c6e6ab411eeda4f63759e3fd27b9e2e2c2caf639 /src/nvim/testdir | |
| parent | 25356f2802b5b98efe7f0d6661979b0a919c4d2d (diff) | |
| parent | f4b4b7c1326cd599b08c78981b032a75ae1faaa7 (diff) | |
| download | rneovim-00e3ba22fe8c36cd53aa1b398d09b0af1fcbbcb0.tar.gz rneovim-00e3ba22fe8c36cd53aa1b398d09b0af1fcbbcb0.tar.bz2 rneovim-00e3ba22fe8c36cd53aa1b398d09b0af1fcbbcb0.zip | |
Merge #9247 'vim-patch:8.1.{258,298,299,318,376}'
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/runtest.vim | 1 | ||||
| -rw-r--r-- | src/nvim/testdir/test_ins_complete.vim | 13 | ||||
| -rw-r--r-- | src/nvim/testdir/test_stat.vim | 18 |
3 files changed, 29 insertions, 3 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 99b2b940d7..4fe7db135b 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()', \ 'Test_quoteplus()', \ 'Test_quotestar()', \ 'Test_reltime()', 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\<C-X>\<C-N>\<CR>\<ESC>", "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 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? |