view src/testdir/test_fnameescape.vim @ 13631:5088c187e55c

Added tag v8.0.1687 for changeset fd3389d64825e04289426bd0e3d66f18deae39cb
author Christian Brabandt <cb@256bit.org>
date Tue, 10 Apr 2018 18:30:08 +0200
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