diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-25 22:00:49 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-25 22:00:49 +0000 |
commit | fb9dcb080b5143d3021a8c1d6deaf143f2ca3a48 (patch) | |
tree | 040cf1573765ab99d781a4483838720267e8df2d /src | |
parent | 1802405d71da20dff510690bf14f6da085836125 (diff) | |
download | vim-git-fb9dcb080b5143d3021a8c1d6deaf143f2ca3a48.tar.gz |
patch 8.2.3898: Vim9: not sufficient testing for variable initializationv8.2.3898
Problem: Vim9: not sufficient testing for variable initialization.
Solution: Add another test case.
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_vim9_disassemble.vim | 18 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim index 3b8e12d01..55a430584 100644 --- 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 index adb3722db..e41dcb145 100644 --- 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, |