Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 21546:4d3e983313dc v8.2.1323
patch 8.2.1323: Vim9: invalid operators only rejected in :def function
Commit: https://github.com/vim/vim/commit/696ba23149eb5a7226e606e3fe6f15fdd064c5f7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 29 21:20:41 2020 +0200
patch 8.2.1323: Vim9: invalid operators only rejected in :def function
Problem: Vim9: invalid operators only rejected in :def function.
Solution: Also reject them at script level. (closes https://github.com/vim/vim/issues/6564)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 29 Jul 2020 21:30:04 +0200 |
parents | 6c67c86a202a |
children | 55aa283a0e5e |
comparison
equal
deleted
inserted
replaced
21545:3ee29bab85e1 | 21546:4d3e983313dc |
---|---|
829 assert_equal(0z01ab3344, g:ablob + 0z3344) | 829 assert_equal(0z01ab3344, g:ablob + 0z3344) |
830 assert_equal(0z01ab01ab, g:ablob + g:ablob) | 830 assert_equal(0z01ab01ab, g:ablob + g:ablob) |
831 enddef | 831 enddef |
832 | 832 |
833 def Test_expr5_vim9script() | 833 def Test_expr5_vim9script() |
834 # only checks line continuation | 834 # check line continuation |
835 let lines =<< trim END | 835 let lines =<< trim END |
836 vim9script | 836 vim9script |
837 let var = 11 | 837 let var = 11 |
838 + 77 | 838 + 77 |
839 - 22 | 839 - 22 |
846 let var = 'one' | 846 let var = 'one' |
847 .. 'two' | 847 .. 'two' |
848 assert_equal('onetwo', var) | 848 assert_equal('onetwo', var) |
849 END | 849 END |
850 CheckScriptSuccess(lines) | 850 CheckScriptSuccess(lines) |
851 | |
852 lines =<< trim END | |
853 vim9script | |
854 echo 'abc' is# 'abc' | |
855 END | |
856 CheckScriptFailure(lines, 'E15:') | |
857 | |
858 lines =<< trim END | |
859 vim9script | |
860 echo 'abc' is? 'abc' | |
861 END | |
862 CheckScriptFailure(lines, 'E15:') | |
863 | |
864 lines =<< trim END | |
865 vim9script | |
866 echo 'abc' isnot# 'abc' | |
867 END | |
868 CheckScriptFailure(lines, 'E15:') | |
869 | |
870 lines =<< trim END | |
871 vim9script | |
872 echo 'abc' isnot? 'abc' | |
873 END | |
874 CheckScriptFailure(lines, 'E15:') | |
851 enddef | 875 enddef |
852 | 876 |
853 def Test_expr5_float() | 877 def Test_expr5_float() |
854 if !has('float') | 878 if !has('float') |
855 MissingFeature 'float' | 879 MissingFeature 'float' |