view src/testdir/test_fnameescape.vim @ 13788:a27d380b257f v8.0.1766

patch 8.0.1766: expanding abbreviation doesn't work commit https://github.com/vim/vim/commit/c3c3e698966fac86dee94799b70947defb85440d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Apr 26 22:30:33 2018 +0200 patch 8.0.1766: expanding abbreviation doesn't work Problem: Expanding abbreviation doesn't work. (Tooth Pik) Solution: Return OK instead of FALSE and FAIL instead of TRUE. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Thu, 26 Apr 2018 22:45:07 +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