From 43f8d7e3ef2db733f01f2d4c03214cd90c5a09be Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 15 Apr 2024 07:11:39 +0800 Subject: vim-patch:9.1.0329: String interpolation fails for Dict type (#28335) Problem: String interpolation fails for Dict type Solution: Support Dict data type properly, also support :put =Dict (without having to convert it to string() first) (Yegappan Lakshmanan) fixes: vim/vim#14529 closes: vim/vim#14541 https://github.com/vim/vim/commit/f01493c55062c01b1cdf9b1e946577f4d1bdddf3 Co-authored-by: Yegappan Lakshmanan --- test/old/testdir/test_expr.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/old/testdir/test_expr.vim') diff --git a/test/old/testdir/test_expr.vim b/test/old/testdir/test_expr.vim index d316e63818..82377aaf19 100644 --- a/test/old/testdir/test_expr.vim +++ b/test/old/testdir/test_expr.vim @@ -904,6 +904,10 @@ func Test_string_interp() endif call assert_equal(0, tmp) + #" Dict interpolation + VAR d = {'a': 10, 'b': [1, 2]} + call assert_equal("{'a': 10, 'b': [1, 2]}", $'{d}') + #" Stray closing brace. call assert_fails('echo $"moo}"', 'E1278:') #" Undefined variable in expansion. -- cgit