Mercurial > vim
comparison src/evalfunc.c @ 19874:f92435f0f449 v8.2.0493
patch 8.2.0493: Vim9: some error messages not tested
Commit: https://github.com/vim/vim/commit/e69f6d044c420d41dced9ba96a3b90f25788e39a
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 1 22:11:01 2020 +0200
patch 8.2.0493: Vim9: some error messages not tested
Problem: Vim9: some error messages not tested.
Solution: Add more tests. Fix uncovered bugs.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Apr 2020 22:15:04 +0200 |
parents | e7bbf6cadc9e |
children | 435726a03481 |
comparison
equal
deleted
inserted
replaced
19873:b256cdad1dbf | 19874:f92435f0f449 |
---|---|
288 static type_T * | 288 static type_T * |
289 ret_string(int argcount UNUSED, type_T **argtypes UNUSED) | 289 ret_string(int argcount UNUSED, type_T **argtypes UNUSED) |
290 { | 290 { |
291 return &t_string; | 291 return &t_string; |
292 } | 292 } |
293 static type_T * ret_list_any(int argcount UNUSED, type_T **argtypes UNUSED) | 293 static type_T * |
294 ret_list_any(int argcount UNUSED, type_T **argtypes UNUSED) | |
294 { | 295 { |
295 return &t_list_any; | 296 return &t_list_any; |
296 } | 297 } |
297 static type_T * | 298 static type_T * |
298 ret_list_number(int argcount UNUSED, type_T **argtypes UNUSED) | 299 ret_list_number(int argcount UNUSED, type_T **argtypes UNUSED) |
328 ret_blob(int argcount UNUSED, type_T **argtypes UNUSED) | 329 ret_blob(int argcount UNUSED, type_T **argtypes UNUSED) |
329 { | 330 { |
330 return &t_blob; | 331 return &t_blob; |
331 } | 332 } |
332 static type_T * | 333 static type_T * |
333 ret_partial_void(int argcount UNUSED, type_T **argtypes UNUSED) | 334 ret_func_any(int argcount UNUSED, type_T **argtypes UNUSED) |
334 { | 335 { |
335 return &t_partial_void; | 336 return &t_func_any; |
337 } | |
338 static type_T * | |
339 ret_partial_any(int argcount UNUSED, type_T **argtypes UNUSED) | |
340 { | |
341 return &t_partial_any; | |
336 } | 342 } |
337 static type_T * | 343 static type_T * |
338 ret_channel(int argcount UNUSED, type_T **argtypes UNUSED) | 344 ret_channel(int argcount UNUSED, type_T **argtypes UNUSED) |
339 { | 345 { |
340 return &t_channel; | 346 return &t_channel; |
556 {"foldclosedend", 1, 1, FEARG_1, ret_number, f_foldclosedend}, | 562 {"foldclosedend", 1, 1, FEARG_1, ret_number, f_foldclosedend}, |
557 {"foldlevel", 1, 1, FEARG_1, ret_number, f_foldlevel}, | 563 {"foldlevel", 1, 1, FEARG_1, ret_number, f_foldlevel}, |
558 {"foldtext", 0, 0, 0, ret_string, f_foldtext}, | 564 {"foldtext", 0, 0, 0, ret_string, f_foldtext}, |
559 {"foldtextresult", 1, 1, FEARG_1, ret_string, f_foldtextresult}, | 565 {"foldtextresult", 1, 1, FEARG_1, ret_string, f_foldtextresult}, |
560 {"foreground", 0, 0, 0, ret_void, f_foreground}, | 566 {"foreground", 0, 0, 0, ret_void, f_foreground}, |
561 {"funcref", 1, 3, FEARG_1, ret_partial_void, f_funcref}, | 567 {"funcref", 1, 3, FEARG_1, ret_partial_any, f_funcref}, |
562 {"function", 1, 3, FEARG_1, ret_f_function, f_function}, | 568 {"function", 1, 3, FEARG_1, ret_f_function, f_function}, |
563 {"garbagecollect", 0, 1, 0, ret_void, f_garbagecollect}, | 569 {"garbagecollect", 0, 1, 0, ret_void, f_garbagecollect}, |
564 {"get", 2, 3, FEARG_1, ret_any, f_get}, | 570 {"get", 2, 3, FEARG_1, ret_any, f_get}, |
565 {"getbufinfo", 0, 1, 0, ret_list_dict_any, f_getbufinfo}, | 571 {"getbufinfo", 0, 1, 0, ret_list_dict_any, f_getbufinfo}, |
566 {"getbufline", 2, 3, FEARG_1, ret_list_string, f_getbufline}, | 572 {"getbufline", 2, 3, FEARG_1, ret_list_string, f_getbufline}, |
950 {"test_getvalue", 1, 1, FEARG_1, ret_number, f_test_getvalue}, | 956 {"test_getvalue", 1, 1, FEARG_1, ret_number, f_test_getvalue}, |
951 {"test_ignore_error", 1, 1, FEARG_1, ret_void, f_test_ignore_error}, | 957 {"test_ignore_error", 1, 1, FEARG_1, ret_void, f_test_ignore_error}, |
952 {"test_null_blob", 0, 0, 0, ret_blob, f_test_null_blob}, | 958 {"test_null_blob", 0, 0, 0, ret_blob, f_test_null_blob}, |
953 {"test_null_channel", 0, 0, 0, ret_channel, JOB_FUNC(f_test_null_channel)}, | 959 {"test_null_channel", 0, 0, 0, ret_channel, JOB_FUNC(f_test_null_channel)}, |
954 {"test_null_dict", 0, 0, 0, ret_dict_any, f_test_null_dict}, | 960 {"test_null_dict", 0, 0, 0, ret_dict_any, f_test_null_dict}, |
961 {"test_null_function", 0, 0, 0, ret_func_any, f_test_null_function}, | |
955 {"test_null_job", 0, 0, 0, ret_job, JOB_FUNC(f_test_null_job)}, | 962 {"test_null_job", 0, 0, 0, ret_job, JOB_FUNC(f_test_null_job)}, |
956 {"test_null_list", 0, 0, 0, ret_list_any, f_test_null_list}, | 963 {"test_null_list", 0, 0, 0, ret_list_any, f_test_null_list}, |
957 {"test_null_partial", 0, 0, 0, ret_partial_void, f_test_null_partial}, | 964 {"test_null_partial", 0, 0, 0, ret_partial_any, f_test_null_partial}, |
958 {"test_null_string", 0, 0, 0, ret_string, f_test_null_string}, | 965 {"test_null_string", 0, 0, 0, ret_string, f_test_null_string}, |
959 {"test_option_not_set", 1, 1, FEARG_1,ret_void, f_test_option_not_set}, | 966 {"test_option_not_set", 1, 1, FEARG_1,ret_void, f_test_option_not_set}, |
960 {"test_override", 2, 2, FEARG_2, ret_void, f_test_override}, | 967 {"test_override", 2, 2, FEARG_2, ret_void, f_test_override}, |
961 {"test_refcount", 1, 1, FEARG_1, ret_number, f_test_refcount}, | 968 {"test_refcount", 1, 1, FEARG_1, ret_number, f_test_refcount}, |
962 {"test_scrollbar", 3, 3, FEARG_2, ret_void, | 969 {"test_scrollbar", 3, 3, FEARG_2, ret_void, |