diff options
Diffstat (limited to 'src/testdir/test_normal.vim')
-rw-r--r-- | src/testdir/test_normal.vim | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/testdir/test_normal.vim b/src/testdir/test_normal.vim index 21d6aa988..d33723b12 100644 --- a/src/testdir/test_normal.vim +++ b/src/testdir/test_normal.vim @@ -389,10 +389,22 @@ func! Test_normal10_expand() call setline(1, ['1', 'ifooar,,cbar']) 2 norm! $ - let a=expand('<cword>') - let b=expand('<cWORD>') - call assert_equal('cbar', a) - call assert_equal('ifooar,,cbar', b) + call assert_equal('cbar', expand('<cword>')) + call assert_equal('ifooar,,cbar', expand('<cWORD>')) + + call setline(1, ['prx = list[idx];']) + 1 + let expected = ['', 'prx', 'prx', 'prx', + \ 'list', 'list', 'list', 'list', 'list', 'list', 'list', + \ 'idx', 'idx', 'idx', 'idx', + \ 'list[idx]', + \ '];', + \ ] + for i in range(1, 16) + exe 'norm ' . i . '|' + call assert_equal(expected[i], expand('<cexpr>'), 'i == ' . i) + endfor + " clean up bw! endfunc |