aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_vimscript.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-31 09:39:31 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-31 10:49:57 +0800
commit30f85fcb7f86857d70601569847e6bd0019fa54c (patch)
treee28aaa8e9449b38e5cc25386575e8a05b9084a84 /test/old/testdir/test_vimscript.vim
parent619cb143f93fbf75adde9710415a74d36c8eb63d (diff)
downloadrneovim-30f85fcb7f86857d70601569847e6bd0019fa54c.tar.gz
rneovim-30f85fcb7f86857d70601569847e6bd0019fa54c.tar.bz2
rneovim-30f85fcb7f86857d70601569847e6bd0019fa54c.zip
vim-patch:9.1.0419: eval.c not sufficiently tested
Problem: eval.c not sufficiently tested Solution: Add a few more additional tests for eval.c, (Yegappan Lakshmanan) closes: vim/vim#14799 https://github.com/vim/vim/commit/4776e64e72de2976ff90b17d236e50e2b02c5540 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'test/old/testdir/test_vimscript.vim')
-rw-r--r--test/old/testdir/test_vimscript.vim11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/old/testdir/test_vimscript.vim b/test/old/testdir/test_vimscript.vim
index 108321e8ad..7f29c7f651 100644
--- a/test/old/testdir/test_vimscript.vim
+++ b/test/old/testdir/test_vimscript.vim
@@ -7450,12 +7450,13 @@ func Test_for_over_string()
endfor
call assert_equal('', res)
- " Test for ignoring loop var assignment
- let c = 0
- for _ in 'abc'
- let c += 1
+ " Test for using "_" as the loop variable
+ let i = 0
+ let s = 'abc'
+ for _ in s
+ call assert_equal(s[i], _)
+ let i += 1
endfor
- call assert_equal(3, c)
endfunc
" Test for deeply nested :source command {{{1