diff options
| author | Sean Dewar <seandewar@users.noreply.github.com> | 2021-11-01 00:28:00 +0000 |
|---|---|---|
| committer | Sean Dewar <seandewar@users.noreply.github.com> | 2021-11-26 18:53:10 +0000 |
| commit | 39776d1a6513e33a33addb69deae72ab2ecafef4 (patch) | |
| tree | 9120486becad2853c52adc59a00bd31bd55be20b /src/nvim/testdir/test_window_cmd.vim | |
| parent | 0f4510cb1a48c4c4d7b23a45f57d087329d4364d (diff) | |
| download | rneovim-39776d1a6513e33a33addb69deae72ab2ecafef4.tar.gz rneovim-39776d1a6513e33a33addb69deae72ab2ecafef4.tar.bz2 rneovim-39776d1a6513e33a33addb69deae72ab2ecafef4.zip | |
vim-patch:8.1.2011: more functions can be used as methods
Problem: More functions can be used as methods.
Solution: Make various functions usable as a method. Make the window
command test faster.
https://github.com/vim/vim/commit/ce90e36f5969e733a0a919f1736453332c33aad6
test_* functions in the patch are N/A as they modify internal state.
Include test changes for test_ignore_error and test_feedinput (though they aren't run).
Other changed tests were excluded from previous patches, except test_termcodes.vim, which hasn't
been ported yet.
Diffstat (limited to 'src/nvim/testdir/test_window_cmd.vim')
| -rw-r--r-- | src/nvim/testdir/test_window_cmd.vim | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim index 039de0c623..588ff5a103 100644 --- a/src/nvim/testdir/test_window_cmd.vim +++ b/src/nvim/testdir/test_window_cmd.vim @@ -452,7 +452,7 @@ func Test_window_newtab() wincmd T call assert_equal(2, tabpagenr('$')) call assert_equal(['Xb', 'Xa'], map(tabpagebuflist(1), 'bufname(v:val)')) - call assert_equal(['Xc' ], map(tabpagebuflist(2), 'bufname(v:val)')) + call assert_equal(['Xc' ], map(2->tabpagebuflist(), 'bufname(v:val)')) %bw! endfunc @@ -577,8 +577,11 @@ endfunc function! Fun_RenewFile() " Need to wait a bit for the timestamp to be older. - sleep 2 - silent execute '!echo "1" > tmp.txt' + let old_ftime = getftime("tmp.txt") + while getftime("tmp.txt") == old_ftime + sleep 100m + silent execute '!echo "1" > tmp.txt' + endwhile sp wincmd p edit! tmp.txt @@ -814,7 +817,7 @@ func Test_winnr() tabnew call assert_equal(8, tabpagewinnr(1, 'j')) - call assert_equal(2, tabpagewinnr(1, 'k')) + call assert_equal(2, 1->tabpagewinnr('k')) call assert_equal(4, tabpagewinnr(1, 'h')) call assert_equal(6, tabpagewinnr(1, 'l')) |