mirror of
https://github.com/neovim/neovim.git
synced 2026-08-03 14:19:15 +00:00
Adds method call support for all functions in the patch, but it cannot
be fully ported due to missing tests for:
- filereadable(): requires v8.1.1378 for Test_delete_rf(), but there
appears to have been some trouble porting it. (#12784)
- confirm(): requires v8.1.0832 for Test_confirm() and v8.1.0815 for
feedkeys()'s "L" flag.
(I did attempt to port the test using nvim_input() instead,
but seems that input handling for confirm() doesn't work in
--headless mode?)
Note that confirm() was actually added as a method in
v8.1.1915.
Uncomment use of method call syntax in Test_Executable() previously
included instead from v8.2.2259.
28 lines
630 B
VimL
28 lines
630 B
VimL
|
|
" 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
|