Mercurial > vim
view src/testdir/test_fnameescape.vim @ 20754:e6a5a5ef4034 v8.2.0929
patch 8.2.0929: v:register is not cleared after an operator was executed
Commit: https://github.com/vim/vim/commit/cc613031b96f1cfa5a184253e745c26f1def9be4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 7 21:31:18 2020 +0200
patch 8.2.0929: v:register is not cleared after an operator was executed
Problem: v:register is not cleared after an operator was executed.
Solution: Clear v:register after finishing an operator (Andy Massimino,
closes #5305)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Jun 2020 21:45:04 +0200 |
parents | b8fd7364befd |
children | 08940efa6b4e |
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