view src/testdir/test_fnameescape.vim @ 17936:7f3283683d97 v8.1.1964

patch 8.1.1964: crash when using nested map() and filter() Commit: https://github.com/vim/vim/commit/c36350bca3eed8ef97061e28c38b5b89cae1f13e Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 2 20:44:07 2019 +0200 patch 8.1.1964: crash when using nested map() and filter() Problem: Crash when using nested map() and filter(). Solution: Do not set the v:key type to string without clearing the pointer.
author Bram Moolenaar <Bram@vim.org>
date Mon, 02 Sep 2019 20:45:04 +0200
parents 73ddc462979d
children b8fd7364befd
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)
endfunc