summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_vim9_cmd.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-01 09:27:20 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-01 09:27:20 +0000
commit3d2e031d4f0e1559e4a4f99de5eb2330f38f8eb5 (patch)
tree281d80ef4a30e818d196cd870b7a3e05aaa49e5f /src/testdir/test_vim9_cmd.vim
parentfad2742d538123abb9b384a053fd581f2acf6bb0 (diff)
patch 8.2.3710: Vim9: backtick expression expanded for :globalv8.2.3710
Problem: Vim9: backtick expression expanded for :global. Solution: Check the following command.
Diffstat (limited to 'src/testdir/test_vim9_cmd.vim')
-rw-r--r--src/testdir/test_vim9_cmd.vim15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 2fbccf4a71..ece3f734f0 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -183,11 +183,18 @@ def Test_expand_alternate_file()
enddef
def Test_global_backtick_expansion()
+ var name = 'xxx'
new
- setline(1, 'xx')
- var name = 'foobar'
- g/^xx/s/.*/`=name`
- assert_equal('foobar', getline(1))
+ setline(1, ['one', 'two', 'three'])
+ set nomod
+ g/two/edit `=name`
+ assert_equal('xxx', bufname())
+ bwipe!
+
+ new
+ setline(1, ['one', 'two', 'three'])
+ g/two/s/^/`=name`/
+ assert_equal('`=name`two', getline(2))
bwipe!
enddef