view src/testdir/test_fnameescape.vim @ 17682:3dbff5d37520 v8.1.1838

patch 8.1.1838: there is :spellwrong and :spellgood but not :spellrare commit https://github.com/vim/vim/commit/08cc374dabd2a02785129fa1c0100f7745c244ad Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 11 22:51:14 2019 +0200 patch 8.1.1838: there is :spellwrong and :spellgood but not :spellrare Problem: There is :spellwrong and :spellgood but not :spellrare. Solution: Add :spellrare. (Martin Tournoij, closes https://github.com/vim/vim/issues/4291)
author Bram Moolenaar <Bram@vim.org>
date Sun, 11 Aug 2019 23:00:07 +0200
parents 63b02fcf1361
children 73ddc462979d
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! " . fnameescape(fname)
    let status = v:true
  endtry
  call assert_true(status, "ExclamationMark")
  call delete(fname)
endfunc