Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 21026:fe2ed85db946 v8.2.1064
patch 8.2.1064: Vim9: no line break allowed before comperators
Commit: https://github.com/vim/vim/commit/e6536aa766e95b6c64489678eb029e6909ee6a35
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 26 22:00:38 2020 +0200
patch 8.2.1064: Vim9: no line break allowed before comperators
Problem: Vim9: no line break allowed before comperators.
Solution: Check for comperator after line break.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 26 Jun 2020 22:15:03 +0200 |
parents | 02b03915855d |
children | 7acceb76669f |
comparison
equal
deleted
inserted
replaced
21025:8463e5662d5b | 21026:fe2ed85db946 |
---|---|
527 | 527 |
528 def RetVoid() | 528 def RetVoid() |
529 let x = 1 | 529 let x = 1 |
530 enddef | 530 enddef |
531 | 531 |
532 def Test_expr4_vimscript() | |
533 " only checks line continuation | |
534 let lines =<< trim END | |
535 vim9script | |
536 let var = 0 | |
537 < 1 | |
538 assert_equal(1, var) | |
539 END | |
540 CheckScriptSuccess(lines) | |
541 | |
542 lines =<< trim END | |
543 vim9script | |
544 let var = 123 | |
545 != 123 | |
546 assert_equal(0, var) | |
547 END | |
548 CheckScriptSuccess(lines) | |
549 | |
550 lines =<< trim END | |
551 vim9script | |
552 let list = [1, 2, 3] | |
553 let var = list | |
554 is list | |
555 assert_equal(1, var) | |
556 END | |
557 CheckScriptSuccess(lines) | |
558 | |
559 lines =<< trim END | |
560 vim9script | |
561 let myblob = 0z1234 | |
562 let var = myblob | |
563 isnot 0z11 | |
564 assert_equal(1, var) | |
565 END | |
566 CheckScriptSuccess(lines) | |
567 enddef | |
568 | |
532 func Test_expr4_fails() | 569 func Test_expr4_fails() |
533 let msg = "white space required before and after '>'" | 570 let msg = "white space required before and after '>'" |
534 call CheckDefFailure(["let x = 1>2"], msg) | 571 call CheckDefFailure(["let x = 1>2"], msg) |
535 call CheckDefFailure(["let x = 1 >2"], msg) | 572 call CheckDefFailure(["let x = 1 >2"], msg) |
536 call CheckDefFailure(["let x = 1> 2"], msg) | 573 call CheckDefFailure(["let x = 1> 2"], msg) |