view src/testdir/test_fnameescape.vim @ 19354:1d3b2ce65ae0 v8.2.0235

patch 8.2.0235: draw error when an empty group is removed from 'statusline' Commit: https://github.com/vim/vim/commit/dbe5d361feb65137099644329cf0ecfd4a945a14 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 8 18:35:31 2020 +0100 patch 8.2.0235: draw error when an empty group is removed from 'statusline' Problem: Draw error when an empty group is removed from 'statusline'. Solution: Do not use highlighting from a removed group.
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Feb 2020 18:45:03 +0100
parents b8fd7364befd
children 08940efa6b4e
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! " . fname->fnameescape()
    let status = v:true
  endtry
  call assert_true(status, "ExclamationMark")
  call delete(fname)

  call assert_equal('\-', fnameescape('-'))
  call assert_equal('\+', fnameescape('+'))
  call assert_equal('\>', fnameescape('>'))
endfunc

" vim: shiftwidth=2 sts=2 expandtab