Mercurial > vim
comparison src/testdir/test_vim9_builtin.vim @ 28008:cc7d54a134e4 v8.2.4529
patch 8.2.4529: Vim9: comparing partial with function fails
Commit: https://github.com/vim/vim/commit/ed0c62e7b16b62655824df28cdd6bd75aadbb8fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Mar 8 19:43:55 2022 +0000
patch 8.2.4529: Vim9: comparing partial with function fails
Problem: Vim9: comparing partial with function fails.
Solution: Support this comparison. Avoid a crash. (closes https://github.com/vim/vim/issues/9909)
Add more test cases.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Mar 2022 20:45:03 +0100 |
parents | 1b75d767d9e4 |
children | 662d2d5db9a6 |
comparison
equal
deleted
inserted
replaced
28007:e11bea0167bb | 28008:cc7d54a134e4 |
---|---|
1685 else | 1685 else |
1686 assert_report('getenv() should return null') | 1686 assert_report('getenv() should return null') |
1687 endif | 1687 endif |
1688 $SOMEENVVAR = 'some' | 1688 $SOMEENVVAR = 'some' |
1689 assert_equal('some', getenv('SOMEENVVAR')) | 1689 assert_equal('some', getenv('SOMEENVVAR')) |
1690 assert_notequal(null, getenv('SOMEENVVAR')) | |
1690 unlet $SOMEENVVAR | 1691 unlet $SOMEENVVAR |
1691 getenv('')->assert_equal(v:null) | 1692 getenv('')->assert_equal(v:null) |
1692 enddef | 1693 enddef |
1693 | 1694 |
1694 def Test_getfontname() | 1695 def Test_getfontname() |
4396 | 4397 |
4397 def Test_typename() | 4398 def Test_typename() |
4398 if has('float') | 4399 if has('float') |
4399 assert_equal('func([unknown], [unknown]): float', typename(function('pow'))) | 4400 assert_equal('func([unknown], [unknown]): float', typename(function('pow'))) |
4400 endif | 4401 endif |
4401 assert_equal('func', test_null_partial()->typename()) | 4402 assert_equal('func(...): unknown', test_null_partial()->typename()) |
4402 assert_equal('list<unknown>', test_null_list()->typename()) | 4403 assert_equal('list<unknown>', test_null_list()->typename()) |
4403 assert_equal('dict<unknown>', test_null_dict()->typename()) | 4404 assert_equal('dict<unknown>', test_null_dict()->typename()) |
4404 if has('job') | 4405 if has('job') |
4405 assert_equal('job', test_null_job()->typename()) | 4406 assert_equal('job', test_null_job()->typename()) |
4406 endif | 4407 endif |