annotate src/testdir/test_textobjects.in @ 7933:1f0743f4f88f v7.4.1262

commit https://github.com/vim/vim/commit/a07fec9c85d062acd9dd433a2e681770f459ba47 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Feb 5 21:04:08 2016 +0100 patch 7.4.1262 Problem: The channel callback is not invoked. Solution: Make a list of pending callbacks.
author Christian Brabandt <cb@256bit.org>
date Fri, 05 Feb 2016 21:15:04 +0100
parents cdddbd63bcfe
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6675
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for text-objects vim: set ft=vim :
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :if !has('textobjects') | e! test.ok | wq! test.out | endif
6742
cdddbd63bcfe patch 7.4.694
Bram Moolenaar <bram@vim.org>
parents: 6675
diff changeset
6 :set nocp viminfo+=nviminfo
6675
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :"
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :function SelectionOut(data)
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 : new
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 : call setline(1, a:data)
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 : call setreg('"', '')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 : normal! ggfrmavi)y
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 : $put =getreg('\"')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 : call setreg('"', '')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 : normal! `afbmavi)y
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 : $put =getreg('\"')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 : call setreg('"', '')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 : normal! `afgmavi)y
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 : $put =getreg('\"')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 : %yank a
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 : q!
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 : $put =getreg('a')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :endfunction
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 :"
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :$put ='# Test for vi) without cpo-M'
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :set cpo-=M
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :call SelectionOut('(red \(blue) green)')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :"
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :$put ='# Test for vi) with cpo-M #1'
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :set cpo+=M
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 :call SelectionOut('(red \(blue) green)')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :"
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 :$put ='# Test for vi) with cpo-M #2'
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :set cpo+=M
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :call SelectionOut('(red (blue\) green)')
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :/^Results/,$w test.out
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :qa!
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 ENDTEST
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39
24e0b6dd52e1 updated for version 7.4.662
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 Results of text-objects