view src/testdir/test_fnameescape.vim @ 16883:c7c1b4618acb

Added tag v8.1.1442 for changeset 473e76401434ebe13ab80749f44351cb76a86289
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Jun 2019 18:15:05 +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