Patch 8.2.4234
Problem: test_garbagecollect_now() does not check v:testing as documented.
Solution: Give an error if v:testing is not set.
Files: src/testing.c, src/errors.h, src/testdir/test_functions.vim
*** ../vim-8.2.4233/src/testing.c 2022-01-27 13:16:54.332078790 +0000
--- src/testing.c 2022-01-27 19:48:39.455440685 +0000
***************
*** 1153,1159 ****
{
// This is dangerous, any Lists and Dicts used internally may be freed
// while still in use.
! garbage_collect(TRUE);
}
/*
--- 1153,1162 ----
{
// This is dangerous, any Lists and Dicts used internally may be freed
// while still in use.
! if (!get_vim_var_nr(VV_TESTING))
! emsg(_(e_calling_test_garbagecollect_now_while_v_testing_is_not_set));
! else
! garbage_collect(TRUE);
}
/*
*** ../vim-8.2.4233/src/errors.h 2022-01-26 21:01:11.192928481 +0000
--- src/errors.h 2022-01-27 19:45:48.885882873 +0000
***************
*** 2909,2915 ****
INIT(= N_("E1140: :for argument must be a sequence of lists"));
EXTERN char e_indexable_type_required[]
INIT(= N_("E1141: Indexable type required"));
! // E1142 unused
EXTERN char e_empty_expression_str[]
INIT(= N_("E1143: Empty expression: \"%s\""));
EXTERN char e_command_str_not_followed_by_white_space_str[]
--- 2909,2916 ----
INIT(= N_("E1140: :for argument must be a sequence of lists"));
EXTERN char e_indexable_type_required[]
INIT(= N_("E1141: Indexable type required"));
! EXTERN char e_calling_test_garbagecollect_now_while_v_testing_is_not_set[]
! INIT(= N_("E1142: Calling test_garbagecollect_now() while v:testing is
not set"));
EXTERN char e_empty_expression_str[]
INIT(= N_("E1143: Empty expression: \"%s\""));
EXTERN char e_command_str_not_followed_by_white_space_str[]
*** ../vim-8.2.4233/src/testdir/test_functions.vim 2022-01-24
22:32:24.559939355 +0000
--- src/testdir/test_functions.vim 2022-01-27 19:52:21.916225070 +0000
***************
*** 2663,2668 ****
--- 2663,2674 ----
call assert_fails('let x=range(1, 4, [])', 'E745:')
endfunc
+ func Test_garbagecollect_now_fails()
+ let v:testing = 0
+ call assert_fails('call test_garbagecollect_now()', 'E1142:')
+ let v:testing = 1
+ endfunc
+
func Test_echoraw()
CheckScreendump
*** ../vim-8.2.4233/src/version.c 2022-01-27 19:27:10.450531357 +0000
--- src/version.c 2022-01-27 19:46:51.152994201 +0000
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 4234,
/**/
--
Wi n0t trei a h0liday in Sweden thi yer?
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220127200104.A75271C4EF6%40moolenaar.net.