Patch 8.2.0353
Problem: Vim9: while loop not tested.
Solution: Add test with "while", "break" and "continue"
Files: src/testdir/test_vim9_script.vim
*** ../vim-8.2.0352/src/testdir/test_vim9_script.vim 2020-03-03
19:02:09.185924967 +0100
--- src/testdir/test_vim9_script.vim 2020-03-04 21:49:21.480184984 +0100
***************
*** 855,882 ****
delete('XToDelFunc')
enddef
- def Test_substitute_cmd()
- new
- setline(1, 'something')
- :substitute(some(other(
- assert_equal('otherthing', getline(1))
- bwipe!
-
- " also when the context is Vim9 script
- let lines =<< trim END
- vim9script
- new
- setline(1, 'something')
- :substitute(some(other(
- assert_equal('otherthing', getline(1))
- bwipe!
- END
- writefile(lines, 'Xvim9lines')
- source Xvim9lines
-
- delete('Xvim9lines')
- enddef
-
def Test_execute_cmd()
new
setline(1, 'default')
--- 855,860 ----
***************
*** 920,923 ****
--- 898,939 ----
delete('Xvim9for.vim')
enddef
+ def Test_while_loop()
+ let result = ''
+ let cnt = 0
+ while cnt < 555
+ if cnt == 3
+ break
+ endif
+ cnt += 1
+ if cnt == 2
+ continue
+ endif
+ result ..= cnt .. '_'
+ endwhile
+ assert_equal('1_3_', result)
+ enddef
+
+ def Test_substitute_cmd()
+ new
+ setline(1, 'something')
+ :substitute(some(other(
+ assert_equal('otherthing', getline(1))
+ bwipe!
+
+ " also when the context is Vim9 script
+ let lines =<< trim END
+ vim9script
+ new
+ setline(1, 'something')
+ :substitute(some(other(
+ assert_equal('otherthing', getline(1))
+ bwipe!
+ END
+ writefile(lines, 'Xvim9lines')
+ source Xvim9lines
+
+ delete('Xvim9lines')
+ enddef
+
" vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker
*** ../vim-8.2.0352/src/version.c 2020-03-03 23:06:44.522535263 +0100
--- src/version.c 2020-03-04 21:50:27.776124903 +0100
***************
*** 740,741 ****
--- 740,743 ----
{ /* Add new patch number below this line */
+ /**/
+ 353,
/**/
--
Living in Hollywood is like living in a bowl of granola. What ain't
fruits and nuts is flakes.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202003042051.024KpOKr001426%40masaka.moolenaar.net.