diff options
Diffstat (limited to 'test/old/testdir/test_expr.vim')
-rw-r--r-- | test/old/testdir/test_expr.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/old/testdir/test_expr.vim b/test/old/testdir/test_expr.vim index 82377aaf19..8871e7e7d7 100644 --- a/test/old/testdir/test_expr.vim +++ b/test/old/testdir/test_expr.vim @@ -907,6 +907,18 @@ func Test_string_interp() #" 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 = v:_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 = v:_null_list + call assert_equal("a[]b", $'a{nulllist}b') #" Stray closing brace. call assert_fails('echo $"moo}"', 'E1278:') |