annotate src/testdir/test94.in @ 5026:aa1ebdf70483

Added tag v7-3-1256 for changeset 322441058afc
author Bram Moolenaar <bram@vim.org>
date Fri, 28 Jun 2013 20:16:55 +0200
parents 1d56e5dfa08e
children bf3e6012dfbd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4274
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Test for Visual mode and operators
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 Tests for the two kinds of operations: Those executed with Visual mode
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 followed by an operator and those executed via Operator-pending mode. Also
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 part of the test are mappings, counts, and repetition with the . command.
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 Test cases:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 - Visual modes (v V CTRL-V) followed by an operator; count; repeating
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 - Visual mode maps; count; repeating
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 - Simple
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 - With an Ex command (custom text object)
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 - Operator-pending mode maps
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 - Simple
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 - With Ex command moving the cursor
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 - With Ex command and Visual selection (custom text object)
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 - Patch 7.3.879: Properly abort Ex command in Operator-pending mode
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 STARTTEST
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 :so small.vim
4329
9f642ac84df9 updated for version 7.3.914
Bram Moolenaar <bram@vim.org>
parents: 4274
diff changeset
20 :set nocp viminfo+=nviminfo
4274
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :" User functions
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 :function MoveToCap()
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 : call search('\u', 'W')
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :endfunction
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :function SelectInCaps()
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 : let [line1, col1] = searchpos('\u', 'bcnW')
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 : let [line2, col2] = searchpos('.\u', 'nW')
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 : call setpos("'<", [0, line1, col1, 0])
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 : call setpos("'>", [0, line2, col2, 0])
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 : normal! gv
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :endfunction
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 :
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :" Visual modes followed by operator
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 /^apple
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 lvld.l3vd.:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 /^line 1
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 Vcnewlinej.j2Vd.:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 /^xxxx
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 jlc l.l2c----l.:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 :
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 :" Visual mode maps (movement and text object)
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 :vnoremap W /\u/s-1<CR>
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 :vnoremap iW :<C-U>call SelectInCaps()<CR>
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 /^Kiwi
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 vWcNol.fD2vd.:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
47 /^Jambu
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
48 llviWc-l.l2vdl.:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
49 :
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
50 :" Operator-pending mode maps (movement and text object)
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
51 :onoremap W /\u/<CR>
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 :onoremap <Leader>W :<C-U>call MoveToCap()<CR>
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 :onoremap iW :<C-U>call SelectInCaps()<CR>
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54 /^Pineapple
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 cW-l.l2.l.:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 /^Juniper
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 g?\WfD.:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 /^Lemon
4346
1d56e5dfa08e updated for version 7.3.922
Bram Moolenaar <bram@vim.org>
parents: 4329
diff changeset
59 yiWPlciWNewfr.:
4274
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 :
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 :" Patch 7.3.879: Properly abort Operator-pending mode for "dv:<Esc>" etc.
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 /^zzzz
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 dV: dv: :set noma | let v:errmsg = ''
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 d: :set ma | put = v:errmsg =~# '^E21' ? 'ok' : 'failed'
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 dv:dV::set noma | let v:errmsg = ''
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 d::set ma | put = v:errmsg =~# '^E21' ? 'failed' : 'ok'
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 :/^start:/+2,$w! test.out
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 :q!
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 ENDTEST
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
71 start:
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
72
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 apple banana cherry
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 line 1 line 1
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 line 2 line 2
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77 line 3 line 3
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
78 line 4 line 4
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
79 line 5 line 5
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
80 line 6 line 6
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
81
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
82 xxxxxxxxxxxxx
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
83 xxxxxxxxxxxxx
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
84 xxxxxxxxxxxxx
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
85 xxxxxxxxxxxxx
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
86
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
87 KiwiRaspberryDateWatermelonPeach
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
88 JambuRambutanBananaTangerineMango
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
89
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
90 PineappleQuinceLoganberryOrangeGrapefruitKiwiZ
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91 JuniperDurianZ
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 LemonNectarineZ
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
93
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 zzzz
015e53d99787 updated for version 7.3.887
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 zzzz