forked from aniani/vim
patch 8.2.4934: string interpolation fails when not evaluating
Problem: String interpolation fails when not evaluating. Solution: Skip the expression when not evaluating. (closes #10398)
This commit is contained in:
@@ -2156,6 +2156,13 @@ def Test_expr8_string()
|
||||
->split($'x{x}x')
|
||||
->map((_, v: string) => v =~ 'bar')
|
||||
assert_equal([false, true, false], vl)
|
||||
|
||||
# interpolated string in a lambda
|
||||
lines =<< trim END
|
||||
assert_equal(['gnome-256color', 'xterm-256color'], ['gnome', 'xterm']
|
||||
->map((_, term: string) => $'{term}-256color'))
|
||||
END
|
||||
v9.CheckDefAndScriptSuccess(lines)
|
||||
enddef
|
||||
|
||||
def Test_expr8_vimvar()
|
||||
|
Reference in New Issue
Block a user