annotate src/testdir/test_textobjects.in @ 8410:05ec48deb353 v7.4.1496

commit https://github.com/vim/vim/commit/a96909cfaf21dbbf033e904ccdcda9905799f0fc Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 5 22:19:41 2016 +0100 patch 7.4.1496 Problem: Crash when built with GUI but it's not active. (Dominique Pelle) Solution: Check gui.in_use.
author Christian Brabandt <cb@256bit.org>
date Sat, 05 Mar 2016 22:30: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