comparison src/testdir/test_expr.vim @ 25688:c07b6c54146a v8.2.3380

patch 8.2.3380: crash when using NULL string for funcref() Commit: https://github.com/vim/vim/commit/60b6e6f6cc60ac99253e1c13bd0cae4ef0e43201 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 28 12:49:27 2021 +0200 patch 8.2.3380: crash when using NULL string for funcref() Problem: Crash when using NULL string for funcref(). Solution: Check for NULL argument. (issue https://github.com/vim/vim/issues/8260)
author Bram Moolenaar <Bram@vim.org>
date Sat, 28 Aug 2021 13:00:04 +0200
parents 13efbfc53054
children 2093cc976da8
comparison
equal deleted inserted replaced
25687:dff7f4a5740c 25688:c07b6c54146a
499 call assert_equal(2, OneByRef()) 499 call assert_equal(2, OneByRef())
500 call assert_fails('echo funcref("{")', 'E475:') 500 call assert_fails('echo funcref("{")', 'E475:')
501 let OneByRef = funcref("One", repeat(["foo"], 20)) 501 let OneByRef = funcref("One", repeat(["foo"], 20))
502 call assert_fails('let OneByRef = funcref("One", repeat(["foo"], 21))', 'E118:') 502 call assert_fails('let OneByRef = funcref("One", repeat(["foo"], 21))', 'E118:')
503 call assert_fails('echo function("min") =~ function("min")', 'E694:') 503 call assert_fails('echo function("min") =~ function("min")', 'E694:')
504 call assert_fails('echo test_null_function()->funcref()', 'E475: Invalid argument: NULL')
504 endfunc 505 endfunc
505 506
506 func Test_setmatches() 507 func Test_setmatches()
507 hi def link 1 Comment 508 hi def link 1 Comment
508 hi def link 2 PreProc 509 hi def link 2 PreProc