Mercurial > vim
view src/testdir/test_fnameescape.vim @ 11018:654fc5636b37 v8.0.0398
patch 8.0.0398: illegal memory access with "t"
commit https://github.com/vim/vim/commit/66727e16079fbac6db3897b5c3736ec9fba995bb
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 1 22:17:05 2017 +0100
patch 8.0.0398: illegal memory access with "t"
Problem: Illegal memory access with "t".
Solution: Use strncmp() instead of memcmp(). (Dominique Pelle, closes https://github.com/vim/vim/issues/1528)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 01 Mar 2017 22:30:04 +0100 |
parents | eb9a7296ae9f |
children | 63b02fcf1361 |
line wrap: on
line source
" Test if fnameescape is correct for special chars like ! function! 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! " . fnameescape(fname) let status = v:true endtry call assert_true(status, "ExclamationMark") call delete(fname) endfunction