To: vim_dev@googlegroups.com Subject: Patch 8.2.3898 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3898 Problem: Vim9: not sufficient testing for variable initialization. Solution: Add another test case. Files: src/testdir/test_vim9_disassemble.vim *** ../vim-8.2.3897/src/testdir/test_vim9_disassemble.vim 2021-12-25 18:23:20.770696173 +0000 --- src/testdir/test_vim9_disassemble.vim 2021-12-25 21:54:18.423300184 +0000 *************** *** 1802,1807 **** --- 1802,1825 ---- 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 =='], *** ../vim-8.2.3897/src/version.c 2021-12-25 21:43:24.300302785 +0000 --- src/version.c 2021-12-25 21:59:31.902805931 +0000 *************** *** 751,752 **** --- 751,754 ---- { /* Add new patch number below this line */ + /**/ + 3898, /**/ -- hundred-and-one symptoms of being an internet addict: 109. You actually read -- and enjoy -- lists like this. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///