view src/testdir/test_fnameescape.vim @ 32403:1b0ade08ec91 v9.0.1533

patch 9.0.1533: test for 'smoothscroll' is ineffective Commit: https://github.com/vim/vim/commit/6f37e530d3e2d58ff055723047bf91d91af2632c Author: Luuk van Baal <luukvbaal@gmail.com> Date: Tue May 9 21:23:54 2023 +0100 patch 9.0.1533: test for 'smoothscroll' is ineffective Problem: Test for 'smoothscroll' is ineffective. Solution: Change the order of testing "zb" and "zt". (Luuk van Baal, closes #12366)
author Bram Moolenaar <Bram@vim.org>
date Tue, 09 May 2023 22:30: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