diff src/testdir/test_vim9_expr.vim @ 21032:f80e822a310d v8.2.1067

patch 8.2.1067: expression "!expr->func()" does not work Commit: https://github.com/vim/vim/commit/0b1cd52ff6bf690388f892be686a91721a082e55 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 27 13:11:50 2020 +0200 patch 8.2.1067: expression "!expr->func()" does not work Problem: Expression "!expr->func()" does not work. Solution: Apply plus and minus earlier. (closes https://github.com/vim/vim/issues/6348)
author Bram Moolenaar <Bram@vim.org>
date Sat, 27 Jun 2020 13:15:03 +0200
parents 7acceb76669f
children 2f8b0812819f
line wrap: on
line diff
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -1081,6 +1081,8 @@ def Test_expr7_parens()
   assert_equal(6, --6)
   assert_equal(6, -+-6)
   assert_equal(-6, ---6)
+  assert_equal(false, !-3)
+  assert_equal(true, !+-+0)
 enddef
 
 def Test_expr7_negate()
@@ -1102,6 +1104,8 @@ enddef
 def Test_expr7_call()
   assert_equal('yes', 'yes'->Echo())
   assert_equal('yes', 'yes'->s:EchoArg())
+  assert_equal(1, !range(5)->empty())
+  assert_equal([0, 1, 2], --3->range())
 
   call CheckDefFailure(["let x = 'yes'->Echo"], 'E107:')
 enddef