vim-patch:9.0.1020: tests call GetSwapFileList() before it is defined

Problem:    Tests call GetSwapFileList() before it is defined.
Solution:   Move the call to after defining the function. (Christopher
            Plewright)

6572a90287

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq 2023-04-19 11:11:20 +08:00
parent ab7bd119d7
commit 5f4e0a005b

View File

@ -131,13 +131,6 @@ if has('mac')
endif
" A previous (failed) test run may have left swap files behind. Delete them
" before running tests again, they might interfere.
for name in s:GetSwapFileList()
call delete(name)
endfor
" Prepare for calling test_garbagecollect_now().
let v:testing = 1
@ -176,6 +169,13 @@ func s:GetSwapFileList()
return files
endfunc
" A previous (failed) test run may have left swap files behind. Delete them
" before running tests again, they might interfere.
for name in s:GetSwapFileList()
call delete(name)
endfor
" Invoked when a test takes too much time.
func TestTimeout(id)
split test.log