comparison src/testdir/test_usercommands.vim @ 28690:9a7a2908e1a8 v8.2.4869

patch 8.2.4869: expression in command block does not look after NL Commit: https://github.com/vim/vim/commit/e442d59f6d6732c226d636067c07b7342838b36b Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 5 12:20:28 2022 +0100 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 https://github.com/vim/vim/issues/10358)
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 May 2022 13:30:05 +0200
parents 2961a18f9cbf
children cf6bba7a9b0f
comparison
equal deleted inserted replaced
28689:0c6c580c01b4 28690:9a7a2908e1a8
693 END 693 END
694 call v9.CheckScriptSuccess(lines) 694 call v9.CheckScriptSuccess(lines)
695 delcommand HelloThere 695 delcommand HelloThere
696 696
697 let lines =<< trim END 697 let lines =<< trim END
698 command EchoCond {
699 const test: string = true
700 ? 'true'
701 : 'false'
702 g:result = test
703 }
704 EchoCond
705 END
706 call v9.CheckScriptSuccess(lines)
707 call assert_equal('true', g:result)
708 delcommand EchoCond
709 unlet g:result
710
711 let lines =<< trim END
698 command BadCommand { 712 command BadCommand {
699 echo { 713 echo {
700 'key': 'value', 714 'key': 'value',
701 } 715 }
702 } 716 }