view src/testdir/test_fnameescape.vim @ 15124:27c801cca007

Added tag v8.1.0572 for changeset 7d2ed364a8a0a1edaf1e02b899cc9cdd3a5e3c26
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Dec 2018 14:45:06 +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