diff options
Diffstat (limited to 'src/testdir/test_expr.vim')
-rw-r--r-- | src/testdir/test_expr.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index c1869c1..6acfe00 100644 --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -950,6 +950,22 @@ 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}') + VAR emptydict = {} + call assert_equal("a{}b", $'a{emptydict}b') + VAR nulldict = test_null_dict() + call assert_equal("a{}b", $'a{nulldict}b') + + #" List interpolation + VAR l = ['a', 'b', 'c'] + call assert_equal("['a', 'b', 'c']", $'{l}') + VAR emptylist = [] + call assert_equal("a[]b", $'a{emptylist}b') + VAR nulllist = test_null_list() + call assert_equal("a[]b", $'a{nulllist}b') + #" Stray closing brace. call assert_fails('echo $"moo}"', 'E1278:') #" Undefined variable in expansion. |