forked from aniani/vim
patch 8.2.3898: Vim9: not sufficient testing for variable initialization
Problem: Vim9: not sufficient testing for variable initialization. Solution: Add another test case.
This commit is contained in:
@@ -1802,6 +1802,24 @@ def Test_disassemble_return_bool()
|
|||||||
assert_equal(true, InvertBool())
|
assert_equal(true, InvertBool())
|
||||||
enddef
|
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()
|
def Test_disassemble_compare()
|
||||||
var cases = [
|
var cases = [
|
||||||
['true == isFalse', 'COMPAREBOOL =='],
|
['true == isFalse', 'COMPAREBOOL =='],
|
||||||
|
|||||||
@@ -749,6 +749,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3898,
|
||||||
/**/
|
/**/
|
||||||
3897,
|
3897,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user