Mercurial > vim
view src/testdir/test_fnameescape.vim @ 24676:256fdb5f7252
Added tag v8.2.2876 for changeset ae30a87aafd3a89cf86f7f0126d36fe858a61151
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 21 May 2021 11:45:03 +0200 |
parents | 08940efa6b4e |
children |
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) call assert_equal('\-', fnameescape('-')) call assert_equal('\+', fnameescape('+')) call assert_equal('\>', fnameescape('>')) endfunc " vim: shiftwidth=2 sts=2 expandtab