view src/testdir/test_fnameescape.vim @ 17826:f2a1c7de4d14

Added tag v8.1.1909 for changeset ce993ba17adbfcc4f142f5ca35701097d9c5ff7a
author Bram Moolenaar <Bram@vim.org>
date Wed, 21 Aug 2019 23:00:04 +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