Mercurial > vim
view src/testdir/test_fnameescape.vim @ 19145:ea3ac1de7704 v8.2.0132
patch 8.2.0132: script may be re-used when deleting and creating a new one
Commit: https://github.com/vim/vim/commit/ca33eb256eb910af05e8c9852bc9f716cece1f5c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 19 20:18:09 2020 +0100
patch 8.2.0132: script may be re-used when deleting and creating a new one
Problem: Script may be re-used when deleting and creating a new one.
Solution: When the inode matches, also check the file name.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 Jan 2020 20:30:04 +0100 |
parents | 73ddc462979d |
children | b8fd7364befd |
line wrap: on
line source
" Test if fnameescape is correct for special chars like ! func Test_fnameescape() let fname = 'Xspa ce' let status = v:false try exe "w! " . fnameescape(fname) let status = v:true endtry call assert_true(status, "Space") call delete(fname) let fname = 'Xemark!' let status = v:false try exe "w! " . fname->fnameescape() let status = v:true endtry call assert_true(status, "ExclamationMark") call delete(fname) endfunc