Mercurial > vim
view src/testdir/test_fnameescape.vim @ 22969:dcb59b1cc0c1 v8.2.2031
patch 8.2.2031: some tests fail when run under valgrind
Commit: https://github.com/vim/vim/commit/18dc355395f2eac72ab83d984cacd26ae61c791f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 22 14:24:00 2020 +0100
patch 8.2.2031: some tests fail when run under valgrind
Problem: Some tests fail when run under valgrind.
Solution: Avoid timing problems.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 Nov 2020 14:30:06 +0100 |
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