# HG changeset patch # User Bram Moolenaar # Date 1640470503 -3600 # Node ID 47ad45fb433a38208b21f3e6ade30e726b41ffe3 # Parent 6ced3f1bd976c3870ba6f896bf493704ce649f4c patch 8.2.3898: Vim9: not sufficient testing for variable initialization Commit: https://github.com/vim/vim/commit/fb9dcb080b5143d3021a8c1d6deaf143f2ca3a48 Author: Bram Moolenaar Date: Sat Dec 25 22:00:49 2021 +0000 patch 8.2.3898: Vim9: not sufficient testing for variable initialization Problem: Vim9: not sufficient testing for variable initialization. Solution: Add another test case. diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim --- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -1802,6 +1802,24 @@ def Test_disassemble_return_bool() assert_equal(true, InvertBool()) enddef +def AutoInit() + var t: number + t = 1 + t = 0 +enddef + +def Test_disassemble_auto_init() + var instr = execute('disassemble AutoInit') + assert_match('AutoInit\_s*' .. + 'var t: number\_s*' .. + 't = 1\_s*' .. + '\d STORE 1 in $0\_s*' .. + 't = 0\_s*' .. + '\d STORE 0 in $0\_s*' .. + '\d\+ RETURN void', + instr) +enddef + def Test_disassemble_compare() var cases = [ ['true == isFalse', 'COMPAREBOOL =='], diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3898, +/**/ 3897, /**/ 3896,