comparison src/testdir/test_vim9_builtin.vim @ 25692:17830c066d4b v8.2.3382

patch 8.2.3382: crash when getting the type of a NULL partial Commit: https://github.com/vim/vim/commit/c8103b4c2547ce2044469bcd49e3d55907bd33d1 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 28 14:58:44 2021 +0200 patch 8.2.3382: crash when getting the type of a NULL partial Problem: Crash when getting the type of a NULL partial. Solution: Check for NULL. (closes https://github.com/vim/vim/issues/8260)
author Bram Moolenaar <Bram@vim.org>
date Sat, 28 Aug 2021 15:00:03 +0200
parents ef38fc02faaa
children f35efe44dacd
comparison
equal deleted inserted replaced
25691:1c6f93ee1ed5 25692:17830c066d4b
3677 3677
3678 def Test_typename() 3678 def Test_typename()
3679 if has('float') 3679 if has('float')
3680 assert_equal('func([unknown], [unknown]): float', typename(function('pow'))) 3680 assert_equal('func([unknown], [unknown]): float', typename(function('pow')))
3681 endif 3681 endif
3682 assert_equal('func', test_null_partial()->typename())
3683 assert_equal('list<unknown>', test_null_list()->typename())
3684 assert_equal('dict<unknown>', test_null_dict()->typename())
3685 if has('job')
3686 assert_equal('job', test_null_job()->typename())
3687 endif
3688 if has('channel')
3689 assert_equal('channel', test_null_channel()->typename())
3690 endif
3682 enddef 3691 enddef
3683 3692
3684 def Test_undofile() 3693 def Test_undofile()
3685 CheckDefAndScriptFailure2(['undofile(10)'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1') 3694 CheckDefAndScriptFailure2(['undofile(10)'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1')
3686 assert_equal('.abc.un~', fnamemodify(undofile('abc'), ':t')) 3695 assert_equal('.abc.un~', fnamemodify(undofile('abc'), ':t'))