aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_substitute.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-15 10:11:41 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-15 10:50:21 +0800
commit465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b (patch)
treed57568b30353002faa5e923ca0ffb8ea434797fc /src/nvim/testdir/test_substitute.vim
parentc821b5c6955e6e15039298d50641608168159c01 (diff)
downloadrneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.tar.gz
rneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.tar.bz2
rneovim-465b73c3a5f1debc0c88e0e2d569f8cdebc51b5b.zip
vim-patch:8.2.0482: channel and sandbox code not sufficiently tested
Problem: Channel and sandbox code not sufficiently tested. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5855) https://github.com/vim/vim/commit/ca68ae13114619df3e4c195b41ad0575516f5ff6 Cherry-pick test_clientserver.vim changes form patch 8.2.0448.
Diffstat (limited to 'src/nvim/testdir/test_substitute.vim')
-rw-r--r--src/nvim/testdir/test_substitute.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_substitute.vim b/src/nvim/testdir/test_substitute.vim
index 9a1144b8e4..f795d1c0cf 100644
--- a/src/nvim/testdir/test_substitute.vim
+++ b/src/nvim/testdir/test_substitute.vim
@@ -839,6 +839,10 @@ func Test_sub_with_no_last_pat()
call delete('Xresult')
endfunc
+func Test_substitute()
+ call assert_equal('a1a2a3a', substitute('123', '\zs', 'a', 'g'))
+endfunc
+
func Test_submatch_list_concatenate()
let pat = 'A\(.\)'
let Rep = {-> string([submatch(0, 1)] + [[submatch(1)]])}