view src/testdir/test_fnameescape.vim @ 15801:669a52a4f948

Added tag v8.1.0907 for changeset 483fda2691001e15d9313085b02437e1616c86e2
author Bram Moolenaar <Bram@vim.org>
date Wed, 13 Feb 2019 01:30:30 +0100
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