diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim index 186ce6d1c6e871071cc4242b87c2403d5e9777fe..3448d8557e1211965b6b1255cdc5dd1606b03785 100644 --- a/src/testdir/test_vim9_disassemble.vim +++ b/src/testdir/test_vim9_disassemble.vim @@ -898,6 +898,27 @@ def Test_disassemble_concat() assert_equal('aabb', ConcatString()) enddef +def StringIndex(): number + let s = "abcd" + let res = s[1] + return res +enddef + +def Test_disassemble_string_index() + let instr = execute('disassemble StringIndex') + assert_match('StringIndex\_s*' .. + 'let s = "abcd"\_s*' .. + '\d PUSHS "abcd"\_s*' .. + '\d STORE $0\_s*' .. + 'let res = s\[1]\_s*' .. + '\d LOAD $0\_s*' .. + '\d PUSHNR 1\_s*' .. + '\d STRINDEX\_s*' .. + '\d STORE $1\_s*', + instr) + assert_equal('b', StringIndex()) +enddef + def ListIndex(): number let l = [1, 2, 3] let res = l[1] @@ -916,7 +937,7 @@ def Test_disassemble_list_index() 'let res = l\[1]\_s*' .. '\d LOAD $0\_s*' .. '\d PUSHNR 1\_s*' .. - '\d INDEX\_s*' .. + '\d LISTINDEX\_s*' .. '\d STORE $1\_s*', instr) assert_equal(2, ListIndex()) diff --git a/src/version.c b/src/version.c index e80df76e105433528936b6a44e46811cacd0899a..6ffb98db553f62616cb82a276ac85d95c3e78b7c 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1249, /**/ 1248, /**/