view src/testdir/test_fnameescape.vim @ 11099:613d9bcd7a52 v8.0.0437

patch 8.0.0437: packadd test does not fully work commit https://github.com/vim/vim/commit/644df41c44cbdfacdedbba55ef77a6c6031eccd8 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 9 13:58:02 2017 +0100 patch 8.0.0437: packadd test does not fully work Problem: The packadd test does not create the symlink correctly and does not test the right thing. Solution: Create the directory and symlink correctly.
author Christian Brabandt <cb@256bit.org>
date Thu, 09 Mar 2017 14:00:06 +0100
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