mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 10:26:42 +10:00
vim-patch:9.0.1007: there is no way to get a list of swap file names
Problem: There is no way to get a list of swap file names.
Solution: Add the swapfilelist() function. Use it in the test script to
clean up. Remove deleting individual swap files.
c216a7a21a
vim-patch:9.0.1005: a failed test may leave a swap file behind
Problem: A failed test may leave a swap file behind.
Solution: Delete the swap file to avoid another test to fail. Use another
file name.
d0f8d39d20
Cherry-pick test_window_cmd.vim changes from patch 8.2.1593.
Remove FUNC_ATTR_UNUSED from eval functions as fptr is always unused.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -119,10 +119,9 @@ endfunc
|
||||
|
||||
" Test the ":wincmd ^" and "<C-W>^" commands.
|
||||
func Test_window_split_edit_alternate()
|
||||
|
||||
" Test for failure when the alternate buffer/file no longer exists.
|
||||
edit Xfoo | %bw
|
||||
call assert_fails(':wincmd ^', 'E23')
|
||||
call assert_fails(':wincmd ^', 'E23:')
|
||||
|
||||
" Test for the expected behavior when we have two named buffers.
|
||||
edit Xfoo | edit Xbar
|
||||
@@ -152,12 +151,11 @@ endfunc
|
||||
|
||||
" Test the ":[count]wincmd ^" and "[count]<C-W>^" commands.
|
||||
func Test_window_split_edit_bufnr()
|
||||
|
||||
%bwipeout
|
||||
let l:nr = bufnr('%') + 1
|
||||
call assert_fails(':execute "normal! ' . l:nr . '\<C-W>\<C-^>"', 'E92')
|
||||
call assert_fails(':' . l:nr . 'wincmd ^', 'E16')
|
||||
call assert_fails(':0wincmd ^', 'E16')
|
||||
call assert_fails(':execute "normal! ' . l:nr . '\<C-W>\<C-^>"', 'E92:')
|
||||
call assert_fails(':' . l:nr . 'wincmd ^', 'E16:')
|
||||
call assert_fails(':0wincmd ^', 'E16:')
|
||||
|
||||
edit Xfoo | edit Xbar | edit Xbaz
|
||||
let l:foo_nr = bufnr('Xfoo')
|
||||
|
||||
Reference in New Issue
Block a user