comparison src/testdir/test_vim9_expr.vim @ 21739:caf0286cf02b v8.2.1419

patch 8.2.1419: Vim9: not operator applied too early Commit: https://github.com/vim/vim/commit/59eccb92e3c68f65525e08d2113213ff7d7ed00a Author: Bram Moolenaar <Bram@vim.org> Date: Mon Aug 10 23:09:37 2020 +0200 patch 8.2.1419: Vim9: not operator applied too early Problem: Vim9: not operator applied too early. Solution: Implement the "numeric_only" argument. (closes https://github.com/vim/vim/issues/6680)
author Bram Moolenaar <Bram@vim.org>
date Mon, 10 Aug 2020 23:15:03 +0200
parents a849c984b485
children 9ef7ae8ab51c
comparison
equal deleted inserted replaced
21738:c7693230fb82 21739:caf0286cf02b
1742 1742
1743 def Test_expr7_call() 1743 def Test_expr7_call()
1744 assert_equal('yes', 'yes'->Echo()) 1744 assert_equal('yes', 'yes'->Echo())
1745 assert_equal('yes', 'yes' 1745 assert_equal('yes', 'yes'
1746 ->s:Echo4Arg()) 1746 ->s:Echo4Arg())
1747 assert_equal(1, !range(5)->empty()) 1747 assert_equal(true, !range(5)->empty())
1748 assert_equal([0, 1, 2], --3->range()) 1748 assert_equal([0, 1, 2], --3->range())
1749 1749
1750 call CheckDefFailure(["let x = 'yes'->Echo"], 'E107:') 1750 call CheckDefFailure(["let x = 'yes'->Echo"], 'E107:')
1751 call CheckScriptFailure([ 1751 call CheckScriptFailure([
1752 "vim9script", 1752 "vim9script",
1780 assert_equal(true, !0z) 1780 assert_equal(true, !0z)
1781 assert_equal(false, !0z01) 1781 assert_equal(false, !0z01)
1782 1782
1783 assert_equal(true, !test_void()) 1783 assert_equal(true, !test_void())
1784 assert_equal(true, !test_unknown()) 1784 assert_equal(true, !test_unknown())
1785
1786 assert_equal(false, ![1, 2, 3]->reverse())
1787 assert_equal(true, ![]->reverse())
1785 END 1788 END
1786 CheckDefSuccess(lines) 1789 CheckDefSuccess(lines)
1787 CheckScriptSuccess(['vim9script'] + lines) 1790 CheckScriptSuccess(['vim9script'] + lines)
1788 enddef 1791 enddef
1789 1792