diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2018-09-09 19:54:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-09 19:54:27 +0200 |
| commit | bbbed9fc6613c5b69d4ed471ff60d31246c03e35 (patch) | |
| tree | 4afbea8273f2f06772e86dfee4302cedc655b689 /src/nvim/testdir/test_exec_while_if.vim | |
| parent | dd0dd4d78d65cf3a5a75dfceaf0dbf6f4d97501c (diff) | |
| parent | fe81b926d394d719a8a2cd31f0dfd7d4675a9c6a (diff) | |
| download | rneovim-bbbed9fc6613c5b69d4ed471ff60d31246c03e35.tar.gz rneovim-bbbed9fc6613c5b69d4ed471ff60d31246c03e35.tar.bz2 rneovim-bbbed9fc6613c5b69d4ed471ff60d31246c03e35.zip | |
Merge #8063 from blueyed/vim-8.0.0708
Diffstat (limited to 'src/nvim/testdir/test_exec_while_if.vim')
| -rw-r--r-- | src/nvim/testdir/test_exec_while_if.vim | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_exec_while_if.vim b/src/nvim/testdir/test_exec_while_if.vim new file mode 100644 index 0000000000..d6afabff45 --- /dev/null +++ b/src/nvim/testdir/test_exec_while_if.vim @@ -0,0 +1,53 @@ +" Test for :execute, :while and :if + +function Test_exec_while_if() + new + + let i = 0 + while i < 12 + let i = i + 1 + if has("ebcdic") + execute "normal o" . i . "\047" + else + execute "normal o" . i . "\033" + endif + if i % 2 + normal Ax + if i == 9 + break + endif + if i == 5 + continue + else + let j = 9 + while j > 0 + if has("ebcdic") + execute "normal" j . "a" . j . "\x27" + else + execute "normal" j . "a" . j . "\x1b" + endif + let j = j - 1 + endwhile + endif + endif + if i == 9 + if has("ebcdic") + execute "normal Az\047" + else + execute "normal Az\033" + endif + endif + endwhile + unlet i j + + call assert_equal(["", + \ "1x999999999888888887777777666666555554444333221", + \ "2", + \ "3x999999999888888887777777666666555554444333221", + \ "4", + \ "5x", + \ "6", + \ "7x999999999888888887777777666666555554444333221", + \ "8", + \ "9x"], getline(1, 10)) +endfunction |