Mercurial > vim
view src/testdir/test_findfile.vim @ 11649:0f7888a5ba68 v8.0.0707
patch 8.0.0707: freeing wrong memory with certain autocommands
commit https://github.com/vim/vim/commit/f1d13478e3a7e1a86d52552c8c5571f00dc28ad1
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jul 11 18:28:46 2017 +0200
patch 8.0.0707: freeing wrong memory with certain autocommands
Problem: Freeing wrong memory when manipulating buffers in autocommands.
(James McCoy)
Solution: Also set the w_s pointer if w_buffer was NULL.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 11 Jul 2017 18:30:03 +0200 |
parents | a479b7064550 |
children | 977a05589b65 |
line wrap: on
line source
" Test for findfile() " func Test_findfile() new let cwd=getcwd() cd .. " Tests may be run from a shadow directory, so an extra cd needs to be done to " get above src/ if fnamemodify(getcwd(), ':t') != 'src' cd ../.. else cd .. endif set ssl call assert_equal('src/testdir/test_findfile.vim', findfile('test_findfile.vim','src/test*')) exe "cd" cwd cd .. call assert_equal('testdir/test_findfile.vim', findfile('test_findfile.vim','test*')) call assert_equal('testdir/test_findfile.vim', findfile('test_findfile.vim','testdir')) exe "cd" cwd q! endfunc