view src/testdir/test_fnameescape.vim @ 14666:70fc1a842e29 v8.1.0346

patch 8.1.0346: building with Aap is outdated and unused commit https://github.com/vim/vim/commit/acca8df9d475bbfbafc71691ebc3b857ecd2777e Author: Bram Moolenaar <Bram@vim.org> Date: Sun Sep 2 15:27:07 2018 +0200 patch 8.1.0346: building with Aap is outdated and unused Problem: Building with Aap is outdated and unused. Solution: Remove the Aap build files.
author Christian Brabandt <cb@256bit.org>
date Sun, 02 Sep 2018 15:30:09 +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