Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
26357:058ce5b5b367 | 26358:80b555c4aed0 |
---|---|
181 END | 181 END |
182 CheckDefAndScriptSuccess(lines) | 182 CheckDefAndScriptSuccess(lines) |
183 enddef | 183 enddef |
184 | 184 |
185 def Test_global_backtick_expansion() | 185 def Test_global_backtick_expansion() |
186 var name = 'xxx' | |
186 new | 187 new |
187 setline(1, 'xx') | 188 setline(1, ['one', 'two', 'three']) |
188 var name = 'foobar' | 189 set nomod |
189 g/^xx/s/.*/`=name` | 190 g/two/edit `=name` |
190 assert_equal('foobar', getline(1)) | 191 assert_equal('xxx', bufname()) |
192 bwipe! | |
193 | |
194 new | |
195 setline(1, ['one', 'two', 'three']) | |
196 g/two/s/^/`=name`/ | |
197 assert_equal('`=name`two', getline(2)) | |
191 bwipe! | 198 bwipe! |
192 enddef | 199 enddef |
193 | 200 |
194 def Test_folddo_backtick_expansion() | 201 def Test_folddo_backtick_expansion() |
195 new | 202 new |