comparison src/testdir/test_vim9_cmd.vim @ 28895:228154db3ce6 v8.2.4970

patch 8.2.4970: "eval 123" gives an error, "eval 'abc'" does not Commit: https://github.com/vim/vim/commit/0d03263fd731986c0eee1a08e0f1b19f1bc3a7ad Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 17 12:45:15 2022 +0100 patch 8.2.4970: "eval 123" gives an error, "eval 'abc'" does not Problem: "eval 123" gives an error, "eval 'abc'" does not. Solution: Also give an error when evaluating only a string. (closes https://github.com/vim/vim/issues/10434)
author Bram Moolenaar <Bram@vim.org>
date Tue, 17 May 2022 14:00:05 +0200
parents a090c60278f5
children a712ea475390
comparison
equal deleted inserted replaced
28894:05217054f93c 28895:228154db3ce6
695 $SomeEnv = 'value' 695 $SomeEnv = 'value'
696 $SomeEnv 696 $SomeEnv
697 END 697 END
698 v9.CheckDefAndScriptFailure(lines, 'E1207:', 2) 698 v9.CheckDefAndScriptFailure(lines, 'E1207:', 2)
699 $SomeEnv = '' 699 $SomeEnv = ''
700
701 lines =<< trim END
702 eval 'value'
703 END
704 v9.CheckDefAndScriptFailure(lines, 'E1207:', 1)
705
706 lines =<< trim END
707 eval "value"
708 END
709 v9.CheckDefAndScriptFailure(lines, 'E1207:', 1)
700 enddef 710 enddef
701 711
702 def Test_environment_use_linebreak() 712 def Test_environment_use_linebreak()
703 var lines =<< trim END 713 var lines =<< trim END
704 new 714 new