Mercurial > vim
view src/testdir/test_textobjects.vim @ 11414:c95c5ddc3b0d v8.0.0591
patch 8.0.0591: changes to eval functionality not documented
commit https://github.com/vim/vim/commit/45d2cca1ea3f90fc70ad99d0c6812a9d8536303c
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 30 16:36:05 2017 +0200
patch 8.0.0591: changes to eval functionality not documented
Problem: Changes to eval functionality not documented.
Solution: Include all the changes.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 30 Apr 2017 16:45:03 +0200 |
parents | ae45d497868f |
children | 29a781fd3f27 |
line wrap: on
line source
" Test for textobjects if !has('textobjects') finish endif set belloff=all function! CpoM(line, useM, expected) new if a:useM set cpoptions+=M else set cpoptions-=M endif call setline(1, a:line) call setreg('"', '') normal! ggfrmavi)y call assert_equal(getreg('"'), a:expected[0]) call setreg('"', '') normal! `afbmavi)y call assert_equal(getreg('"'), a:expected[1]) call setreg('"', '') normal! `afgmavi)y call assert_equal(getreg('"'), a:expected[2]) q! endfunction function! Test_inner_block_without_cpo_M() call CpoM('(red \(blue) green)', 0, ['red \(blue', 'red \(blue', '']) endfunction function! Test_inner_block_with_cpo_M_left_backslash() call CpoM('(red \(blue) green)', 1, ['red \(blue) green', 'blue', 'red \(blue) green']) endfunction function! Test_inner_block_with_cpo_M_right_backslash() call CpoM('(red (blue\) green)', 1, ['red (blue\) green', 'blue\', 'red (blue\) green']) endfunction