forked from aniani/vim
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)
This commit is contained in:
@@ -694,6 +694,20 @@ func Test_usercmd_with_block()
|
||||
call v9.CheckScriptSuccess(lines)
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user