diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 03:56:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 03:56:56 +0000 |
commit | 75a9fa68f6cdd6769813a8c5e055bfb00a08c089 (patch) | |
tree | daf1676b4e5ea491b7a370467a24b8181cc21827 /src/testdir/test_vimscript.vim | |
parent | Adding upstream version 2:9.1.0377. (diff) | |
download | vim-upstream/2%9.1.0496.tar.xz vim-upstream/2%9.1.0496.zip |
Adding upstream version 2:9.1.0496.upstream/2%9.1.0496
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/testdir/test_vimscript.vim')
-rw-r--r-- | src/testdir/test_vimscript.vim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim index 0c4aedb..8976779 100644 --- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -7509,6 +7509,14 @@ func Test_for_over_string() let res ..= c .. '-' endfor call assert_equal('', res) + + " 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 endfunc " Test for deeply nested :source command {{{1 |