comparison src/testdir/test_substitute.vim @ 19783:546bdeef35f1 v8.2.0448

patch 8.2.0448: various functions not properly tested Commit: https://github.com/vim/vim/commit/0e05de46226eb4e5ea580beefa71831f92d613d3 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 25 22:23:46 2020 +0100 patch 8.2.0448: various functions not properly tested Problem: Various functions not properly tested. Solution: Add more tests, especially for failures. (Yegappan Lakshmanan, closes #5843)
author Bram Moolenaar <Bram@vim.org>
date Wed, 25 Mar 2020 22:30:04 +0100
parents 02111977dd05
children 12518b40c161
comparison
equal deleted inserted replaced
19782:e5f4316b01dd 19783:546bdeef35f1
240 call assert_fails('s\\a', 'E10:') 240 call assert_fails('s\\a', 'E10:')
241 241
242 setl nomodifiable 242 setl nomodifiable
243 call assert_fails('s/foo/bar/', 'E21:') 243 call assert_fails('s/foo/bar/', 'E21:')
244 244
245 call assert_fails("let s=substitute([], 'a', 'A', 'g')", 'E730:')
246 call assert_fails("let s=substitute('abcda', [], 'A', 'g')", 'E730:')
247 call assert_fails("let s=substitute('abcda', 'a', [], 'g')", 'E730:')
248 call assert_fails("let s=substitute('abcda', 'a', 'A', [])", 'E730:')
249
245 bwipe! 250 bwipe!
246 endfunc 251 endfunc
247 252
248 " Test for *sub-replace-special* and *sub-replace-expression* on substitute(). 253 " Test for *sub-replace-special* and *sub-replace-expression* on substitute().
249 func Test_sub_replace_1() 254 func Test_sub_replace_1()