Mercurial > vim
diff src/testdir/test_vim9_cmd.vim @ 26358:80b555c4aed0 v8.2.3710
patch 8.2.3710: Vim9: backtick expression expanded for :global
Commit: https://github.com/vim/vim/commit/3d2e031d4f0e1559e4a4f99de5eb2330f38f8eb5
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Dec 1 09:27:20 2021 +0000
patch 8.2.3710: Vim9: backtick expression expanded for :global
Problem: Vim9: backtick expression expanded for :global.
Solution: Check the following command.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Dec 2021 10:30:06 +0100 |
parents | 0884f2be6c2a |
children | a5dac0a9aa5f |
line wrap: on
line diff
--- 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