diff options
| author | James McCoy <jamessan@jamessan.com> | 2016-12-12 10:53:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-12 10:53:32 -0500 |
| commit | 988ab5804a16beafff26b487b0612cb7cf97ea09 (patch) | |
| tree | e31b25acaf30023616d4f469af5d067befd30556 /src/nvim/testdir/test_expr.vim | |
| parent | 75c18b6aaa8430596fa10466dc7918047b13ff2b (diff) | |
| parent | 5e4eb18eb0242794c0b3a622f7acf0d3e6856c05 (diff) | |
| download | rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.tar.gz rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.tar.bz2 rneovim-988ab5804a16beafff26b487b0612cb7cf97ea09.zip | |
Merge pull request #5529 from brcolow/vim-7.4.1559
Port partial patches from vim
Diffstat (limited to 'src/nvim/testdir/test_expr.vim')
| -rw-r--r-- | src/nvim/testdir/test_expr.vim | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_expr.vim b/src/nvim/testdir/test_expr.vim index 66a10b05e1..cc5e9587ed 100644 --- a/src/nvim/testdir/test_expr.vim +++ b/src/nvim/testdir/test_expr.vim @@ -15,6 +15,28 @@ func Test_version() call assert_false(has('patch-9.9.1')) endfunc +func Test_equal() + let base = {} + func base.method() + return 1 + endfunc + func base.other() dict + return 1 + endfunc + let instance = copy(base) + call assert_true(base.method == instance.method) + call assert_true([base.method] == [instance.method]) + call assert_true(base.other == instance.other) + call assert_true([base.other] == [instance.other]) + + call assert_false(base.method == base.other) + call assert_false([base.method] == [base.other]) + call assert_false(base.method == instance.other) + call assert_false([base.method] == [instance.other]) + + call assert_fails('echo base.method > instance.method') +endfunc + func Test_strgetchar() call assert_equal(char2nr('a'), strgetchar('axb', 0)) call assert_equal(char2nr('x'), strgetchar('axb', 1)) |