comparison src/testdir/test_substitute.vim @ 22375:595ea7f099cd v8.2.1736

patch 8.2.1736: failure to compile a pattern not tested much Commit: https://github.com/vim/vim/commit/531be47ac5522807b265c6287021a01c9b895ac9 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 23 22:38:05 2020 +0200 patch 8.2.1736: failure to compile a pattern not tested much Problem: Failure to compile a pattern not tested much. Solution: Add tests where a pattern fails to compile. (Yegappan Lakshmanan, closes #7004)
author Bram Moolenaar <Bram@vim.org>
date Wed, 23 Sep 2020 22:45:06 +0200
parents 3ec9e302ec94
children 87ff80c08e4b
comparison
equal deleted inserted replaced
22374:e9b3a8c9ae2c 22375:595ea7f099cd
244 244
245 call assert_fails("let s=substitute([], 'a', 'A', 'g')", 'E730:') 245 call assert_fails("let s=substitute([], 'a', 'A', 'g')", 'E730:')
246 call assert_fails("let s=substitute('abcda', [], '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:') 247 call assert_fails("let s=substitute('abcda', 'a', [], 'g')", 'E730:')
248 call assert_fails("let s=substitute('abcda', 'a', 'A', [])", 'E730:') 248 call assert_fails("let s=substitute('abcda', 'a', 'A', [])", 'E730:')
249 call assert_fails("let s=substitute('abc', '\\%(', 'A', 'g')", 'E53:')
249 250
250 bwipe! 251 bwipe!
251 endfunc 252 endfunc
252 253
253 " Test for *sub-replace-special* and *sub-replace-expression* on substitute(). 254 " Test for *sub-replace-special* and *sub-replace-expression* on substitute().