comparison src/testdir/test_vim9_cmd.vim @ 23197:4ba101403fa2 v8.2.2144

patch 8.2.2144: Vim9: some corner cases not tested Commit: https://github.com/vim/vim/commit/025cb1ca8605055383c53bf2c823d7093cf29b82 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 14 18:31:27 2020 +0100 patch 8.2.2144: Vim9: some corner cases not tested Problem: Vim9: some corner cases not tested. Solution: Add a few tests.
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Dec 2020 18:45:04 +0100
parents 6aa8ddf7a3fa
children d998222d314d
comparison
equal deleted inserted replaced
23196:88a6a5655af0 23197:4ba101403fa2
18 edit `=filename``=filenr` 18 edit `=filename``=filenr`
19 assert_equal('Xtest77', bufname()) 19 assert_equal('Xtest77', bufname())
20 20
21 edit X`=filename`xx`=filenr`yy 21 edit X`=filename`xx`=filenr`yy
22 assert_equal('XXtestxx77yy', bufname()) 22 assert_equal('XXtestxx77yy', bufname())
23
24 CheckDefFailure(['edit `=xxx`'], 'E1001:')
25 CheckDefFailure(['edit `="foo"'], 'E1083:')
23 enddef 26 enddef
24 27
25 def Test_hardcopy_wildcards() 28 def Test_hardcopy_wildcards()
26 CheckUnix 29 CheckUnix
27 CheckFeature postscript 30 CheckFeature postscript
624 :2 627 :2
625 :+2put! a 628 :+2put! a
626 assert_equal('aaa', getline(4)) 629 assert_equal('aaa', getline(4))
627 630
628 bwipe! 631 bwipe!
632
633 CheckDefFailure(['put =xxx'], 'E1001:')
634 enddef
635
636 def Test_put_with_linebreak()
637 new
638 var lines =<< trim END
639 vim9script
640 pu =split('abc', '\zs')
641 ->join()
642 END
643 CheckScriptSuccess(lines)
644 getline(2)->assert_equal('a b c')
645 bwipe!
629 enddef 646 enddef
630 647
631 def Test_command_star_range() 648 def Test_command_star_range()
632 new 649 new
633 setline(1, ['xxx foo xxx', 'xxx bar xxx', 'xxx foo xx bar']) 650 setline(1, ['xxx foo xxx', 'xxx bar xxx', 'xxx foo xx bar'])