patch 8.2.4869: expression in command block does not look after NL
Problem: Expression in command block does not look after NL.
Solution: Skip over NL to check what follows. (closes #10358)
diff --git a/src/testdir/test_usercommands.vim b/src/testdir/test_usercommands.vim
index 2feeef0..8c588c5 100644
--- a/src/testdir/test_usercommands.vim
+++ b/src/testdir/test_usercommands.vim
@@ -695,6 +695,20 @@
delcommand HelloThere
let lines =<< trim END
+ command EchoCond {
+ const test: string = true
+ ? 'true'
+ : 'false'
+ g:result = test
+ }
+ EchoCond
+ END
+ call v9.CheckScriptSuccess(lines)
+ call assert_equal('true', g:result)
+ delcommand EchoCond
+ unlet g:result
+
+ let lines =<< trim END
command BadCommand {
echo {
'key': 'value',