view src/testdir/test_fnameescape.vim @ 15599:9da8ae285a02 v8.1.0807

patch 8.1.0807: session test fails on MS-Windows commit https://github.com/vim/vim/commit/9e79ccbe9ce6fce18939c7ac2e5ad059a3bd1951 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 24 15:57:30 2019 +0100 patch 8.1.0807: session test fails on MS-Windows Problem: Session test fails on MS-Windows. Solution: Don't try creating file with illegal name.
author Bram Moolenaar <Bram@vim.org>
date Thu, 24 Jan 2019 16:00:08 +0100
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