patch 8.2.1331: Vim9: :echo with two lists doesn't work
Problem: Vim9: :echo with two lists doesn't work.
Solution: Do not skip white space before []. (closes #6552)
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index 550e419..226db83 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -1176,6 +1176,10 @@
assert_equal(g:list_mixed, [1, 'b', false,])
assert_equal('b', g:list_mixed[1])
+ echo [1,
+ 2] [3,
+ 4]
+
call CheckDefExecFailure(["let x = g:anint[3]"], 'E714:')
call CheckDefFailure(["let x = g:list_mixed[xxx]"], 'E1001:')
call CheckDefFailure(["let x = [1,2,3]"], 'E1069:')
@@ -1193,6 +1197,10 @@
22,
]
assert_equal([11, 22], l)
+
+ echo [1,
+ 2] [3,
+ 4]
END
CheckScriptSuccess(lines)