mirror of
https://github.com/neovim/neovim.git
synced 2026-01-06 19:39:53 +10:00
vim-patch:8.2.4883: string interpolation only works in heredoc
Problem: String interpolation only works in heredoc.
Solution: Support interpolated strings. Use syntax for heredoc consistent
with strings, similar to C#. (closes vim/vim#10327)
2eaef106e4
Cherry-pick Test_Debugger_breakadd_expr() from Vim.
Co-authored-by: LemonBoy <thatlemon@gmail.com>
This commit is contained in:
@@ -348,6 +348,39 @@ func Test_Debugger_breakadd()
|
||||
call assert_fails('breakadd file Xtest.vim /\)/', 'E55:')
|
||||
endfunc
|
||||
|
||||
" Test for expression breakpoint set using ":breakadd expr <expr>"
|
||||
func Test_Debugger_breakadd_expr()
|
||||
CheckRunVimInTerminal
|
||||
let lines =<< trim END
|
||||
let g:Xtest_var += 1
|
||||
END
|
||||
call writefile(lines, 'Xtest.vim')
|
||||
|
||||
" Start Vim in a terminal
|
||||
let buf = RunVimInTerminal('Xtest.vim', {})
|
||||
call RunDbgCmd(buf, ':let g:Xtest_var = 10')
|
||||
call RunDbgCmd(buf, ':breakadd expr g:Xtest_var')
|
||||
call RunDbgCmd(buf, ':source %')
|
||||
let expected =<< eval trim END
|
||||
Oldval = "10"
|
||||
Newval = "11"
|
||||
{fnamemodify('Xtest.vim', ':p')}
|
||||
line 1: let g:Xtest_var += 1
|
||||
END
|
||||
call RunDbgCmd(buf, ':source %', expected)
|
||||
call RunDbgCmd(buf, 'cont')
|
||||
let expected =<< eval trim END
|
||||
Oldval = "11"
|
||||
Newval = "12"
|
||||
{fnamemodify('Xtest.vim', ':p')}
|
||||
line 1: let g:Xtest_var += 1
|
||||
END
|
||||
call RunDbgCmd(buf, ':source %', expected)
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
call delete('Xtest.vim')
|
||||
endfunc
|
||||
|
||||
func Test_Backtrace_Through_Source()
|
||||
CheckRunVimInTerminal
|
||||
CheckCWD
|
||||
|
||||
Reference in New Issue
Block a user