view src/testdir/test_fnameescape.vim @ 30013:11cfe4c6d677 v9.0.0344

patch 9.0.0344: MS-Windows: background color wrong in Console Commit: https://github.com/vim/vim/commit/e42c8dae32f3575557b83a371c4be66c09afbf7f Author: Yasuhiro Matsumoto <mattn.jp@gmail.com> Date: Thu Sep 1 11:31:45 2022 +0100 patch 9.0.0344: MS-Windows: background color wrong in Console Problem: MS-Windows: background color wrong in Console. Solution: Figure out the default console background color. (Yasuhiro Matsumoto, issue #10310)
author Bram Moolenaar <Bram@vim.org>
date Thu, 01 Sep 2022 12:45:05 +0200
parents 08940efa6b4e
children
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