summaryrefslogtreecommitdiff
path: root/src/testdir/test_vimscript.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-18 23:01:56 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-18 23:01:56 +0200
commit073e4b92e613d22ce7b16e0fbf5c0e40cb5f9b2c (patch)
tree627a153c9bb3076e512a6b0209227b66d5255ce5 /src/testdir/test_vimscript.vim
parent0a52df50a0e8fce6f5e0eb5f5373dcd0fa24d83a (diff)
downloadvim-git-073e4b92e613d22ce7b16e0fbf5c0e40cb5f9b2c.tar.gz
patch 8.1.1888: more functions can be used as methodsv8.1.1888
Problem: More functions can be used as methods. Solution: Make various functions usable as a method.
Diffstat (limited to 'src/testdir/test_vimscript.vim')
-rw-r--r--src/testdir/test_vimscript.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim
index 69a2ebafd..dc4df4448 100644
--- a/src/testdir/test_vimscript.vim
+++ b/src/testdir/test_vimscript.vim
@@ -1330,6 +1330,7 @@ func Test_bitwise_functions()
" and
call assert_equal(127, and(127, 127))
call assert_equal(16, and(127, 16))
+ eval 127->and(16)->assert_equal(16)
call assert_equal(0, and(127, 128))
call assert_fails("call and(1.0, 1)", 'E805:')
call assert_fails("call and([], 1)", 'E745:')
@@ -1340,6 +1341,7 @@ func Test_bitwise_functions()
" or
call assert_equal(23, or(16, 7))
call assert_equal(15, or(8, 7))
+ eval 8->or(7)->assert_equal(15)
call assert_equal(123, or(0, 123))
call assert_fails("call or(1.0, 1)", 'E805:')
call assert_fails("call or([], 1)", 'E745:')
@@ -1350,6 +1352,7 @@ func Test_bitwise_functions()
" xor
call assert_equal(0, xor(127, 127))
call assert_equal(111, xor(127, 16))
+ eval 127->xor(16)->assert_equal(111)
call assert_equal(255, xor(127, 128))
call assert_fails("call xor(1.0, 1)", 'E805:')
call assert_fails("call xor([], 1)", 'E745:')
@@ -1359,6 +1362,7 @@ func Test_bitwise_functions()
call assert_fails("call xor(1, {})", 'E728:')
" invert
call assert_equal(65408, and(invert(127), 65535))
+ eval 127->invert()->and(65535)->assert_equal(65408)
call assert_equal(65519, and(invert(16), 65535))
call assert_equal(65407, and(invert(128), 65535))
call assert_fails("call invert(1.0)", 'E805:')