view src/testdir/test_fnameescape.vim @ 12564:183dc24cf861 v8.0.1160

patch 8.0.1160: getting tab-local variable fails after closing window commit https://github.com/vim/vim/commit/816968defc8ae79eb7e2319e991e74661be8d750 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 29 21:29:18 2017 +0200 patch 8.0.1160: getting tab-local variable fails after closing window Problem: Getting tab-local variable fails after closing window. Solution: set tp_firstwin and tp_lastwin. (Jason Franklin, closes https://github.com/vim/vim/issues/2170)
author Christian Brabandt <cb@256bit.org>
date Fri, 29 Sep 2017 21:30:05 +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