Mercurial > vim
annotate src/testdir/test_normal.vim @ 12736:4ca72d1ed7f0 v8.0.1246
patch 8.0.1246: popup test has an arbitrary delay
commit https://github.com/vim/vim/commit/b315876efa7865486b9cc160d43f0ead47e58d6c
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Nov 2 17:50:14 2017 +0100
patch 8.0.1246: popup test has an arbitrary delay
Problem: Popup test has an arbitrary delay.
Solution: Wait for the ruler to show. (James McCoy)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 02 Nov 2017 18:00:04 +0100 |
parents | 6fa9f6b4d159 |
children | cb9b2774f21f |
rev | line source |
---|---|
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test for various Normal mode commands |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 func! Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 10new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 call setline(1, range(1,100)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 endfunc |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 func! MyFormatExpr() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 " Adds '->$' at lines having numbers followed by trailing whitespace |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 for ln in range(v:lnum, v:lnum+v:count-1) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 let line = getline(ln) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 if getline(ln) =~# '\d\s\+$' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 call setline(ln, substitute(line, '\s\+$', '', '') . '->$') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 endfor |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
16 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
18 func! CountSpaces(type, ...) |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 " for testing operatorfunc |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 " will count the number of spaces |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 " and return the result in g:a |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 let sel_save = &selection |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 let &selection = "inclusive" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 let reg_save = @@ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 if a:0 " Invoked from Visual mode, use gv command. |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 silent exe "normal! gvy" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 elseif a:type == 'line' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 silent exe "normal! '[V']y" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 else |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 silent exe "normal! `[v`]y" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 let g:a=strlen(substitute(@@, '[^ ]', '', 'g')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 let &selection = sel_save |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 let @@ = reg_save |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
36 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
37 |
10342
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
38 func! OpfuncDummy(type, ...) |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
39 " for testing operatorfunc |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
40 let g:opt=&linebreak |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
41 |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
42 if a:0 " Invoked from Visual mode, use gv command. |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
43 silent exe "normal! gvy" |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
44 elseif a:type == 'line' |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
45 silent exe "normal! '[V']y" |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
46 else |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
47 silent exe "normal! `[v`]y" |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
48 endif |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
49 " Create a new dummy window |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
50 new |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
51 let g:bufnr=bufnr('%') |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
52 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 fun! Test_normal00_optrans() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 call append(0, ['1 This is a simple test: abcd', '2 This is the second line', '3 this is the third line']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 exe "norm! Sfoobar\<esc>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 call assert_equal(['foobar', '2 This is the second line', '3 this is the third line', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 exe "norm! $vbsone" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 call assert_equal(['foobar', '2 This is the second one', '3 this is the third line', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 norm! VS Second line here |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 call assert_equal(['foobar', ' Second line here', '3 this is the third line', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 call append(0, ['4 This is a simple test: abcd', '5 This is the second line', '6 this is the third line']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 call append(0, ['1 This is a simple test: abcd', '2 This is the second line', '3 this is the third line']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 norm! 2D |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 call assert_equal(['3 this is the third line', '4 This is a simple test: abcd', '5 This is the second line', '6 this is the third line', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 set cpo+=# |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 norm! 4D |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 call assert_equal(['', '4 This is a simple test: abcd', '5 This is the second line', '6 this is the third line', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 set cpo-=# |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
79 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 func! Test_normal01_keymodel() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 " Test 1: depending on 'keymodel' <s-down> does something different |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
84 50 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 call feedkeys("V\<S-Up>y", 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 call assert_equal(['47', '48', '49', '50'], getline("'<", "'>")) |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
87 set keymodel=startsel |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
88 50 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 call feedkeys("V\<S-Up>y", 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 call assert_equal(['49', '50'], getline("'<", "'>")) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 " Start visual mode when keymodel = startsel |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
92 50 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
93 call feedkeys("\<S-Up>y", 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 call assert_equal(['49', '5'], getreg(0, 0, 1)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 " Do not start visual mode when keymodel= |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
96 set keymodel= |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
97 50 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 call feedkeys("\<S-Up>y$", 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 call assert_equal(['42'], getreg(0, 0, 1)) |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
100 " Stop visual mode when keymodel=stopsel |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
101 set keymodel=stopsel |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
102 50 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
103 call feedkeys("Vkk\<Up>yy", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
104 call assert_equal(['47'], getreg(0, 0, 1)) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
105 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
106 set keymodel= |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
107 50 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
108 call feedkeys("Vkk\<Up>yy", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
109 call assert_equal(['47', '48', '49', '50'], getreg(0, 0, 1)) |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 bw! |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
113 endfunc |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
114 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
115 func! Test_normal02_selectmode() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
116 " some basic select mode tests |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
117 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
118 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
119 norm! gHy |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
120 call assert_equal('y51', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
121 call setline(1, range(1,100)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
122 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
123 exe ":norm! V9jo\<c-g>y" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
124 call assert_equal('y60', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
125 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
126 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
127 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
128 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
129 func! Test_normal02_selectmode2() |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
130 " some basic select mode tests |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
131 call Setup_NewWindow() |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
132 50 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
133 call feedkeys(":set im\n\<c-o>gHc\<c-o>:set noim\n", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
134 call assert_equal('c51', getline('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
135 " clean up |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
136 bw! |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
137 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
138 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
139 func! Test_normal03_join() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
140 " basic join test |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
141 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
142 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
143 norm! VJ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
144 call assert_equal('50 51', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
145 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
146 norm! J |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
147 call assert_equal('100', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
148 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
149 norm! V9-gJ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
150 call assert_equal('919293949596979899100', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
151 call setline(1, range(1,100)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
152 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
153 :j 10 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
154 call assert_equal('100', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
155 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
156 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
157 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
158 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
159 func! Test_normal04_filter() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
160 " basic filter test |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
161 " only test on non windows platform |
10342
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
162 if has('win32') |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
163 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
164 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
165 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
166 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
167 call feedkeys("!!sed -e 's/^/| /'\n", 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
168 call assert_equal('| 1', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
169 90 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
170 :sil :!echo one |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
171 call feedkeys('.', 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
172 call assert_equal('| 90', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
173 95 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
174 set cpo+=! |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
175 " 2 <CR>, 1: for executing the command, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
176 " 2: clear hit-enter-prompt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
177 call feedkeys("!!\n", 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
178 call feedkeys(":!echo one\n\n", 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
179 call feedkeys(".", 'tx') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
180 call assert_equal('one', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
181 set cpo-=! |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
182 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
183 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
184 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
185 func! Test_normal05_formatexpr() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
186 " basic formatexpr test |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
187 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
188 %d_ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
189 call setline(1, ['here: 1 ', '2', 'here: 3 ', '4', 'not here: ']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
190 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
191 set formatexpr=MyFormatExpr() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
192 norm! gqG |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
193 call assert_equal(['here: 1->$', '2', 'here: 3->$', '4', 'not here: '], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
194 set formatexpr= |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
195 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
196 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
197 |
10104
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
198 func Test_normal05_formatexpr_newbuf() |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
199 " Edit another buffer in the 'formatexpr' function |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
200 new |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
201 func! Format() |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
202 edit another |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
203 endfunc |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
204 set formatexpr=Format() |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
205 norm gqG |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
206 bw! |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
207 set formatexpr= |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
208 endfunc |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
209 |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
210 func Test_normal05_formatexpr_setopt() |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
211 " Change the 'formatexpr' value in the function |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
212 new |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
213 func! Format() |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
214 set formatexpr= |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
215 endfunc |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
216 set formatexpr=Format() |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
217 norm gqG |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
218 bw! |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
219 set formatexpr= |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
220 endfunc |
b2dbe79639a2
commit https://github.com/vim/vim/commit/d77f9d595eb5f301b39b4373f2900a13c0ca30e2
Christian Brabandt <cb@256bit.org>
parents:
10102
diff
changeset
|
221 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
222 func! Test_normal06_formatprg() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
223 " basic test for formatprg |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
224 " only test on non windows platform |
10342
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
225 if has('win32') |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
226 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
227 endif |
10579
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
228 |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
229 " uses sed to number non-empty lines |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
230 call writefile(['#!/bin/sh', 'sed ''/./=''|sed ''/./{', 'N', 's/\n/ /', '}'''], 'Xsed_format.sh') |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
231 call system('chmod +x ./Xsed_format.sh') |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
232 let text = ['a', '', 'c', '', ' ', 'd', 'e'] |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
233 let expected = ['1 a', '', '3 c', '', '5 ', '6 d', '7 e'] |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
234 |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
235 10new |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
236 call setline(1, text) |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
237 set formatprg=./Xsed_format.sh |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
238 norm! gggqG |
10579
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
239 call assert_equal(expected, getline(1, '$')) |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
240 bw! |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
241 |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
242 10new |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
243 call setline(1, text) |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
244 set formatprg=donothing |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
245 setlocal formatprg=./Xsed_format.sh |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
246 norm! gggqG |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
247 call assert_equal(expected, getline(1, '$')) |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
248 bw! |
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
249 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
250 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
251 set formatprg= |
10579
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
252 setlocal formatprg= |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
253 call delete('Xsed_format.sh') |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
254 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
255 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
256 func! Test_normal07_internalfmt() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
257 " basic test for internal formmatter to textwidth of 12 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
258 let list=range(1,11) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
259 call map(list, 'v:val." "') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
260 10new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
261 call setline(1, list) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
262 set tw=12 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
263 norm! gggqG |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
264 call assert_equal(['1 2 3', '4 5 6', '7 8 9', '10 11 '], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
265 " clean up |
10579
688b97124d23
patch 8.0.0179: cannot have a local value for 'formatprg'
Christian Brabandt <cb@256bit.org>
parents:
10342
diff
changeset
|
266 set tw=0 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
267 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
268 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
269 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
270 func! Test_normal08_fold() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
271 " basic tests for foldopen/folddelete |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
272 if !has("folding") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
273 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
274 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
275 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
276 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
277 setl foldenable fdm=marker |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
278 " First fold |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
279 norm! V4jzf |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
280 " check that folds have been created |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
281 call assert_equal(['50/*{{{*/', '51', '52', '53', '54/*}}}*/'], getline(50,54)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
282 " Second fold |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
283 46 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
284 norm! V10jzf |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
285 " check that folds have been created |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
286 call assert_equal('46/*{{{*/', getline(46)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
287 call assert_equal('60/*}}}*/', getline(60)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
288 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
289 call assert_equal('45', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
290 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
291 call assert_equal('46/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
292 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
293 call assert_equal('61', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
294 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
295 " open a fold |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
296 norm! Vzo |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
297 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
298 call assert_equal('45', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
299 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
300 call assert_equal('46/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
301 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
302 call assert_equal('47', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
303 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
304 norm! zcVzO |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
305 call assert_equal('46/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
306 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
307 call assert_equal('47', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
308 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
309 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
310 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
311 call assert_equal('49', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
312 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
313 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
314 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
315 call assert_equal('51', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
316 " delete folds |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
317 :46 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
318 " collapse fold |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
319 norm! V14jzC |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
320 " delete all folds recursively |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
321 norm! VzD |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
322 call assert_equal(['46', '47', '48', '49', '50', '51', '52', '53', '54', '55', '56', '57', '58', '59', '60'], getline(46,60)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
323 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
324 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
325 setl nofoldenable fdm=marker |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
326 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
327 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
328 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
329 func! Test_normal09_operatorfunc() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
330 " Test operatorfunc |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
331 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
332 " Add some spaces for counting |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
333 50,60s/$/ / |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
334 unlet! g:a |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
335 let g:a=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
336 nmap <buffer><silent> ,, :set opfunc=CountSpaces<CR>g@ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
337 vmap <buffer><silent> ,, :<C-U>call CountSpaces(visualmode(), 1)<CR> |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
338 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
339 norm V2j,, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
340 call assert_equal(6, g:a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
341 norm V,, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
342 call assert_equal(2, g:a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
343 norm ,,l |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
344 call assert_equal(0, g:a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
345 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
346 exe "norm 0\<c-v>10j2l,," |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
347 call assert_equal(11, g:a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
348 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
349 norm V10j,, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
350 call assert_equal(22, g:a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
351 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
352 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
353 unmap <buffer> ,, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
354 set opfunc= |
10342
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
355 unlet! g:a |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
356 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
357 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
358 |
10342
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
359 func! Test_normal09a_operatorfunc() |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
360 " Test operatorfunc |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
361 call Setup_NewWindow() |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
362 " Add some spaces for counting |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
363 50,60s/$/ / |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
364 unlet! g:opt |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
365 set linebreak |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
366 nmap <buffer><silent> ,, :set opfunc=OpfuncDummy<CR>g@ |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
367 50 |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
368 norm ,,j |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
369 exe "bd!" g:bufnr |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
370 call assert_true(&linebreak) |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
371 call assert_equal(g:opt, &linebreak) |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
372 set nolinebreak |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
373 norm ,,j |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
374 exe "bd!" g:bufnr |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
375 call assert_false(&linebreak) |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
376 call assert_equal(g:opt, &linebreak) |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
377 |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
378 " clean up |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
379 unmap <buffer> ,, |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
380 set opfunc= |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
381 bw! |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
382 unlet! g:opt |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
383 endfunc |
ae0faad76f9a
commit https://github.com/vim/vim/commit/4a08b0dc4dd70334056fc1bf069b5e938f2ed7d5
Christian Brabandt <cb@256bit.org>
parents:
10338
diff
changeset
|
384 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
385 func! Test_normal10_expand() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
386 " Test for expand() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
387 10new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
388 call setline(1, ['1', 'ifooar,,cbar']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
389 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
390 norm! $ |
12421
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
391 call assert_equal('cbar', expand('<cword>')) |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
392 call assert_equal('ifooar,,cbar', expand('<cWORD>')) |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
393 |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
394 call setline(1, ['prx = list[idx];']) |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
395 1 |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
396 let expected = ['', 'prx', 'prx', 'prx', |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
397 \ 'list', 'list', 'list', 'list', 'list', 'list', 'list', |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
398 \ 'idx', 'idx', 'idx', 'idx', |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
399 \ 'list[idx]', |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
400 \ '];', |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
401 \ ] |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
402 for i in range(1, 16) |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
403 exe 'norm ' . i . '|' |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
404 call assert_equal(expected[i], expand('<cexpr>'), 'i == ' . i) |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
405 endfor |
da55ea30842c
patch 8.0.1090: cannot get the text under the cursor like v:beval_text
Christian Brabandt <cb@256bit.org>
parents:
11339
diff
changeset
|
406 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
407 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
408 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
409 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
410 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
411 func! Test_normal11_showcmd() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
412 " test for 'showcmd' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
413 10new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
414 exe "norm! ofoobar\<esc>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
415 call assert_equal(2, line('$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
416 set showcmd |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
417 exe "norm! ofoobar2\<esc>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
418 call assert_equal(3, line('$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
419 exe "norm! VAfoobar3\<esc>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
420 call assert_equal(3, line('$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
421 exe "norm! 0d3\<del>2l" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
422 call assert_equal('obar2foobar3', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
423 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
424 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
425 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
426 func! Test_normal12_nv_error() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
427 " Test for nv_error |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
428 10new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
429 call setline(1, range(1,5)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
430 " should not do anything, just beep |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
431 exe "norm! <c-k>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
432 call assert_equal(map(range(1,5), 'string(v:val)'), getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
433 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
434 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
435 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
436 func! Test_normal13_help() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
437 " Test for F1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
438 call assert_equal(1, winnr()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
439 call feedkeys("\<f1>", 'txi') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
440 call assert_match('help\.txt', bufname('%')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
441 call assert_equal(2, winnr('$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
442 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
443 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
444 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
445 func! Test_normal14_page() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
446 " basic test for Ctrl-F and Ctrl-B |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
447 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
448 exe "norm! \<c-f>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
449 call assert_equal('9', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
450 exe "norm! 2\<c-f>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
451 call assert_equal('25', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
452 exe "norm! 2\<c-b>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
453 call assert_equal('18', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
454 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
455 set scrolloff=5 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
456 exe "norm! 2\<c-f>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
457 call assert_equal('21', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
458 exe "norm! \<c-b>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
459 call assert_equal('13', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
460 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
461 set scrolloff=99 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
462 exe "norm! \<c-f>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
463 call assert_equal('13', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
464 set scrolloff=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
465 100 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
466 exe "norm! $\<c-b>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
467 call assert_equal('92', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
468 call assert_equal([0, 92, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
469 100 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
470 set nostartofline |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
471 exe "norm! $\<c-b>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
472 call assert_equal('92', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
473 call assert_equal([0, 92, 2, 0, 2147483647], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
474 " cleanup |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
475 set startofline |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
476 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
477 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
478 |
10102
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
479 func! Test_normal14_page_eol() |
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
480 10new |
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
481 norm oxxxxxxx |
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
482 exe "norm 2\<c-f>" |
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
483 " check with valgrind that cursor is put back in column 1 |
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
484 exe "norm 2\<c-b>" |
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
485 bw! |
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
486 endfunc |
b80ad55d62d8
commit https://github.com/vim/vim/commit/bc54f3f3fed4dc3556df8c46cee6739d211b0eb2
Christian Brabandt <cb@256bit.org>
parents:
10092
diff
changeset
|
487 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
488 func! Test_normal15_z_scroll_vert() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
489 " basic test for z commands that scroll the window |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
490 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
491 100 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
492 norm! >> |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
493 " Test for z<cr> |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
494 exe "norm! z\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
495 call assert_equal(' 100', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
496 call assert_equal(100, winsaveview()['topline']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
497 call assert_equal([0, 100, 2, 0, 9], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
498 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
499 " Test for zt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
500 21 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
501 norm! >>0zt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
502 call assert_equal(' 21', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
503 call assert_equal(21, winsaveview()['topline']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
504 call assert_equal([0, 21, 1, 0, 8], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
505 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
506 " Test for zb |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
507 30 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
508 norm! >>$ztzb |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
509 call assert_equal(' 30', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
510 call assert_equal(30, winsaveview()['topline']+winheight(0)-1) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
511 call assert_equal([0, 30, 3, 0, 2147483647], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
512 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
513 " Test for z- |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
514 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
515 30 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
516 norm! 0z- |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
517 call assert_equal(' 30', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
518 call assert_equal(30, winsaveview()['topline']+winheight(0)-1) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
519 call assert_equal([0, 30, 2, 0, 9], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
520 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
521 " Test for z{height}<cr> |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
522 call assert_equal(10, winheight(0)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
523 exe "norm! z12\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
524 call assert_equal(12, winheight(0)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
525 exe "norm! z10\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
526 call assert_equal(10, winheight(0)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
527 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
528 " Test for z. |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
529 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
530 21 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
531 norm! 0z. |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
532 call assert_equal(' 21', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
533 call assert_equal(17, winsaveview()['topline']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
534 call assert_equal([0, 21, 2, 0, 9], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
535 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
536 " Test for zz |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
537 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
538 21 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
539 norm! 0zz |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
540 call assert_equal(' 21', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
541 call assert_equal(17, winsaveview()['topline']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
542 call assert_equal([0, 21, 1, 0, 8], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
543 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
544 " Test for z+ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
545 11 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
546 norm! zt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
547 norm! z+ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
548 call assert_equal(' 21', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
549 call assert_equal(21, winsaveview()['topline']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
550 call assert_equal([0, 21, 2, 0, 9], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
551 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
552 " Test for [count]z+ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
553 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
554 norm! 21z+ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
555 call assert_equal(' 21', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
556 call assert_equal(21, winsaveview()['topline']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
557 call assert_equal([0, 21, 2, 0, 9], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
558 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
559 " Test for z^ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
560 norm! 22z+0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
561 norm! z^ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
562 call assert_equal(' 21', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
563 call assert_equal(12, winsaveview()['topline']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
564 call assert_equal([0, 21, 2, 0, 9], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
565 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
566 " Test for [count]z^ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
567 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
568 norm! 30z^ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
569 call assert_equal(' 21', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
570 call assert_equal(12, winsaveview()['topline']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
571 call assert_equal([0, 21, 2, 0, 9], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
572 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
573 " cleanup |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
574 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
575 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
576 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
577 func! Test_normal16_z_scroll_hor() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
578 " basic test for z commands that scroll the window |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
579 10new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
580 15vsp |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
581 set nowrap listchars= |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
582 let lineA='abcdefghijklmnopqrstuvwxyz' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
583 let lineB='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
584 $put =lineA |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
585 $put =lineB |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
586 1d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
587 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
588 " Test for zl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
589 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
590 norm! 5zl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
591 call assert_equal(lineA, getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
592 call assert_equal(6, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
593 call assert_equal(5, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
594 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
595 call assert_equal('f', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
596 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
597 " Test for zh |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
598 norm! 2zh |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
599 call assert_equal(lineA, getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
600 call assert_equal(6, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
601 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
602 call assert_equal('f', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
603 call assert_equal(3, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
604 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
605 " Test for zL |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
606 norm! zL |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
607 call assert_equal(11, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
608 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
609 call assert_equal('k', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
610 call assert_equal(10, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
611 norm! 2zL |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
612 call assert_equal(25, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
613 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
614 call assert_equal('y', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
615 call assert_equal(24, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
616 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
617 " Test for zH |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
618 norm! 2zH |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
619 call assert_equal(25, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
620 call assert_equal(10, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
621 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
622 call assert_equal('y', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
623 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
624 " Test for zs |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
625 norm! $zs |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
626 call assert_equal(26, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
627 call assert_equal(25, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
628 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
629 call assert_equal('z', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
630 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
631 " Test for ze |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
632 norm! ze |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
633 call assert_equal(26, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
634 call assert_equal(11, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
635 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
636 call assert_equal('z', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
637 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
638 " cleanup |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
639 set wrap listchars=eol:$ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
640 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
641 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
642 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
643 func! Test_normal17_z_scroll_hor2() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
644 " basic test for z commands that scroll the window |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
645 " using 'sidescrolloff' setting |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
646 10new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
647 20vsp |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
648 set nowrap listchars= sidescrolloff=5 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
649 let lineA='abcdefghijklmnopqrstuvwxyz' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
650 let lineB='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
651 $put =lineA |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
652 $put =lineB |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
653 1d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
654 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
655 " Test for zl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
656 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
657 norm! 5zl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
658 call assert_equal(lineA, getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
659 call assert_equal(11, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
660 call assert_equal(5, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
661 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
662 call assert_equal('k', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
663 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
664 " Test for zh |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
665 norm! 2zh |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
666 call assert_equal(lineA, getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
667 call assert_equal(11, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
668 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
669 call assert_equal('k', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
670 call assert_equal(3, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
671 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
672 " Test for zL |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
673 norm! 0zL |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
674 call assert_equal(16, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
675 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
676 call assert_equal('p', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
677 call assert_equal(10, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
678 norm! 2zL |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
679 call assert_equal(26, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
680 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
681 call assert_equal('z', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
682 call assert_equal(15, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
683 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
684 " Test for zH |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
685 norm! 2zH |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
686 call assert_equal(15, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
687 call assert_equal(0, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
688 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
689 call assert_equal('o', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
690 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
691 " Test for zs |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
692 norm! $zs |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
693 call assert_equal(26, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
694 call assert_equal(20, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
695 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
696 call assert_equal('z', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
697 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
698 " Test for ze |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
699 norm! ze |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
700 call assert_equal(26, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
701 call assert_equal(11, winsaveview()['leftcol']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
702 norm! yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
703 call assert_equal('z', @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
704 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
705 " cleanup |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
706 set wrap listchars=eol:$ sidescrolloff=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
707 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
708 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
709 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
710 func! Test_normal18_z_fold() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
711 " basic tests for foldopen/folddelete |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
712 if !has("folding") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
713 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
714 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
715 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
716 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
717 setl foldenable fdm=marker foldlevel=5 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
718 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
719 " Test for zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
720 " First fold |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
721 norm! 4zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
722 " check that folds have been created |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
723 call assert_equal(['50/*{{{*/', '51', '52', '53/*}}}*/'], getline(50,53)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
724 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
725 " Test for zd |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
726 51 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
727 norm! 2zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
728 call assert_equal(2, foldlevel('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
729 norm! kzd |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
730 call assert_equal(['50', '51/*{{{*/', '52/*}}}*/', '53'], getline(50,53)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
731 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
732 call assert_equal(1, foldlevel('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
733 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
734 " Test for zD |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
735 " also deletes partially selected folds recursively |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
736 51 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
737 norm! zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
738 call assert_equal(2, foldlevel('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
739 norm! kV2jzD |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
740 call assert_equal(['50', '51', '52', '53'], getline(50,53)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
741 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
742 " Test for zE |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
743 85 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
744 norm! 4zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
745 86 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
746 norm! 2zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
747 90 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
748 norm! 4zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
749 call assert_equal(['85/*{{{*/', '86/*{{{*/', '87/*}}}*/', '88/*}}}*/', '89', '90/*{{{*/', '91', '92', '93/*}}}*/'], getline(85,93)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
750 norm! zE |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
751 call assert_equal(['85', '86', '87', '88', '89', '90', '91', '92', '93'], getline(85,93)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
752 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
753 " Test for zn |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
754 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
755 set foldlevel=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
756 norm! 2zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
757 norm! zn |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
758 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
759 call assert_equal('49', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
760 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
761 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
762 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
763 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
764 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
765 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
766 call assert_equal(0, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
767 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
768 " Test for zN |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
769 49 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
770 norm! zN |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
771 call assert_equal('49', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
772 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
773 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
774 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
775 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
776 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
777 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
778 " Test for zi |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
779 norm! zi |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
780 call assert_equal(0, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
781 norm! zi |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
782 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
783 norm! zi |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
784 call assert_equal(0, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
785 norm! zi |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
786 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
787 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
788 " Test for za |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
789 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
790 norm! za |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
791 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
792 call assert_equal('49', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
793 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
794 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
795 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
796 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
797 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
798 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
799 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
800 norm! za |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
801 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
802 call assert_equal('49', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
803 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
804 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
805 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
806 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
807 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
808 49 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
809 norm! 5zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
810 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
811 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
812 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
813 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
814 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
815 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
816 49 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
817 norm! za |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
818 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
819 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
820 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
821 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
822 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
823 set nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
824 " close fold and set foldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
825 norm! za |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
826 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
827 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
828 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
829 " have to use {count}za to open all folds and make the cursor visible |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
830 norm! 2za |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
831 norm! 2k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
832 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
833 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
834 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
835 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
836 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
837 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
838 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
839 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
840 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
841 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
842 " Test for zA |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
843 49 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
844 set foldlevel=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
845 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
846 norm! zA |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
847 norm! 2k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
848 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
849 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
850 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
851 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
852 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
853 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
854 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
855 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
856 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
857 |
11327
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
858 " zA on a opened fold when foldenable is not set |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
859 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
860 set nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
861 norm! zA |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
862 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
863 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
864 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
865 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
866 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
867 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
868 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
869 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
870 " Test for zc |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
871 norm! zE |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
872 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
873 norm! 2zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
874 49 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
875 norm! 5zF |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
876 set nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
877 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
878 " There most likely is a bug somewhere: |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
879 " https://groups.google.com/d/msg/vim_dev/v2EkfJ_KQjI/u-Cvv94uCAAJ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
880 " TODO: Should this only close the inner most fold or both folds? |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
881 norm! zc |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
882 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
883 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
884 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
885 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
886 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
887 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
888 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
889 set nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
890 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
891 norm! Vjzc |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
892 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
893 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
894 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
895 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
896 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
897 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
898 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
899 " Test for zC |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
900 set nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
901 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
902 norm! zCk |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
903 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
904 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
905 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
906 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
907 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
908 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
909 " Test for zx |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
910 " 1) close folds at line 49-54 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
911 set nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
912 48 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
913 norm! zx |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
914 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
915 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
916 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
917 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
918 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
919 |
11327
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
920 " 2) do not close fold under cursor |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
921 51 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
922 set nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
923 norm! zx |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
924 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
925 norm! 3k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
926 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
927 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
928 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
929 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
930 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
931 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
932 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
933 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
934 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
935 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
936 call assert_equal('53', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
937 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
938 call assert_equal('54/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
939 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
940 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
941 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
942 " 3) close one level of folds |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
943 48 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
944 set nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
945 set foldlevel=1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
946 norm! zx |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
947 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
948 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
949 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
950 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
951 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
952 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
953 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
954 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
955 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
956 call assert_equal('53', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
957 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
958 call assert_equal('54/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
959 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
960 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
961 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
962 " Test for zX |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
963 " Close all folds |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
964 set foldlevel=0 nofoldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
965 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
966 norm! zX |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
967 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
968 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
969 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
970 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
971 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
972 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
973 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
974 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
975 " Test for zm |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
976 50 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
977 set nofoldenable foldlevel=2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
978 norm! zm |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
979 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
980 call assert_equal(1, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
981 norm! zm |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
982 call assert_equal(0, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
983 norm! zm |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
984 call assert_equal(0, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
985 norm! k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
986 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
987 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
988 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
989 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
990 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
991 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
992 " Test for zM |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
993 48 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
994 set nofoldenable foldlevel=99 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
995 norm! zM |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
996 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
997 call assert_equal(0, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
998 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
999 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1000 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1001 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1002 call assert_equal('55', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1003 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1004 " Test for zr |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1005 48 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1006 set nofoldenable foldlevel=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1007 norm! zr |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1008 call assert_equal(0, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1009 call assert_equal(1, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1010 set foldlevel=0 foldenable |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1011 norm! zr |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1012 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1013 call assert_equal(1, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1014 norm! zr |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1015 call assert_equal(2, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1016 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1017 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1018 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1019 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1020 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1021 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1022 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1023 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1024 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1025 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1026 " Test for zR |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1027 48 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1028 set nofoldenable foldlevel=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1029 norm! zR |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1030 call assert_equal(0, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1031 call assert_equal(2, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1032 set foldenable foldlevel=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1033 norm! zR |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1034 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1035 call assert_equal(2, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1036 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1037 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1038 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1039 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1040 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1041 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1042 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1043 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1044 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1045 call append(50, ['a /*{{{*/', 'b /*}}}*/']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1046 48 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1047 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1048 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1049 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1050 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1051 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1052 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1053 call assert_equal('a /*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1054 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1055 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1056 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1057 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1058 48 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1059 norm! zR |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1060 call assert_equal(1, &foldenable) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1061 call assert_equal(3, &foldlevel) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1062 call assert_equal('48', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1063 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1064 call assert_equal('49/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1065 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1066 call assert_equal('50/*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1067 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1068 call assert_equal('a /*{{{*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1069 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1070 call assert_equal('b /*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1071 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1072 call assert_equal('51/*}}}*/', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1073 norm! j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1074 call assert_equal('52', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1075 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1076 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1077 setl nofoldenable fdm=marker foldlevel=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1078 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1079 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1080 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1081 func! Test_normal19_z_spell() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1082 if !has("spell") || !has('syntax') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1083 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1084 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1085 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1086 call append(0, ['1 good', '2 goood', '3 goood']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1087 set spell spellfile=./Xspellfile.add spelllang=en |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1088 let oldlang=v:lang |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1089 lang C |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1090 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1091 " Test for zg |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1092 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1093 norm! ]s |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1094 call assert_equal('2 goood', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1095 norm! zg |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1096 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1097 let a=execute('unsilent :norm! ]s') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1098 call assert_equal('1 good', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1099 call assert_equal('search hit BOTTOM, continuing at TOP', a[1:]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1100 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1101 call assert_equal('goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1102 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1103 " Test for zw |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1104 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1105 norm! $zw |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1106 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1107 norm! ]s |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1108 call assert_equal('2 goood', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1109 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1110 call assert_equal('#oood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1111 call assert_equal('goood/!', cnt[1]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1112 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1113 " Test for zg in visual mode |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1114 let a=execute('unsilent :norm! V$zg') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1115 call assert_equal("Word '2 goood' added to ./Xspellfile.add", a[1:]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1116 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1117 norm! ]s |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1118 call assert_equal('3 goood', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1119 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1120 call assert_equal('2 goood', cnt[2]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1121 " Remove "2 good" from spellfile |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1122 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1123 let a=execute('unsilent norm! V$zw') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1124 call assert_equal("Word '2 goood' added to ./Xspellfile.add", a[1:]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1125 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1126 call assert_equal('2 goood/!', cnt[3]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1127 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1128 " Test for zG |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1129 let a=execute('unsilent norm! V$zG') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1130 call assert_match("Word '2 goood' added to .*", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1131 let fname=matchstr(a, 'to\s\+\zs\f\+$') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1132 let cnt=readfile(fname) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1133 call assert_equal('2 goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1134 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1135 " Test for zW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1136 let a=execute('unsilent norm! V$zW') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1137 call assert_match("Word '2 goood' added to .*", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1138 let cnt=readfile(fname) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1139 call assert_equal('# goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1140 call assert_equal('2 goood/!', cnt[1]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1141 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1142 " Test for zuW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1143 let a=execute('unsilent norm! V$zuW') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1144 call assert_match("Word '2 goood' removed from .*", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1145 let cnt=readfile(fname) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1146 call assert_equal('# goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1147 call assert_equal('# goood/!', cnt[1]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1148 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1149 " Test for zuG |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1150 let a=execute('unsilent norm! $zG') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1151 call assert_match("Word 'goood' added to .*", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1152 let cnt=readfile(fname) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1153 call assert_equal('# goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1154 call assert_equal('# goood/!', cnt[1]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1155 call assert_equal('goood', cnt[2]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1156 let a=execute('unsilent norm! $zuG') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1157 let cnt=readfile(fname) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1158 call assert_match("Word 'goood' removed from .*", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1159 call assert_equal('# goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1160 call assert_equal('# goood/!', cnt[1]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1161 call assert_equal('#oood', cnt[2]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1162 " word not found in wordlist |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1163 let a=execute('unsilent norm! V$zuG') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1164 let cnt=readfile(fname) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1165 call assert_match("", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1166 call assert_equal('# goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1167 call assert_equal('# goood/!', cnt[1]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1168 call assert_equal('#oood', cnt[2]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1169 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1170 " Test for zug |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1171 call delete('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1172 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1173 let a=execute('unsilent norm! $zg') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1174 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1175 call assert_equal('goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1176 let a=execute('unsilent norm! $zug') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1177 call assert_match("Word 'goood' removed from \./Xspellfile.add", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1178 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1179 call assert_equal('#oood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1180 " word not in wordlist |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1181 let a=execute('unsilent norm! V$zug') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1182 call assert_match('', a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1183 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1184 call assert_equal('#oood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1185 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1186 " Test for zuw |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1187 call delete('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1188 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1189 let a=execute('unsilent norm! Vzw') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1190 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1191 call assert_equal('2 goood/!', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1192 let a=execute('unsilent norm! Vzuw') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1193 call assert_match("Word '2 goood' removed from \./Xspellfile.add", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1194 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1195 call assert_equal('# goood/!', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1196 " word not in wordlist |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1197 let a=execute('unsilent norm! $zug') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1198 call assert_match('', a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1199 let cnt=readfile('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1200 call assert_equal('# goood/!', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1201 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1202 " add second entry to spellfile setting |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1203 set spellfile=./Xspellfile.add,./Xspellfile2.add |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1204 call delete('./Xspellfile.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1205 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1206 let a=execute('unsilent norm! $2zg') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1207 let cnt=readfile('./Xspellfile2.add') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1208 call assert_match("Word 'goood' added to ./Xspellfile2.add", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1209 call assert_equal('goood', cnt[0]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1210 |
12730
6fa9f6b4d159
patch 8.0.1243: no test for what 8.0.1227 fixes
Christian Brabandt <cb@256bit.org>
parents:
12644
diff
changeset
|
1211 " Test for :spellgood! |
6fa9f6b4d159
patch 8.0.1243: no test for what 8.0.1227 fixes
Christian Brabandt <cb@256bit.org>
parents:
12644
diff
changeset
|
1212 let temp = execute(':spe!0/0') |
6fa9f6b4d159
patch 8.0.1243: no test for what 8.0.1227 fixes
Christian Brabandt <cb@256bit.org>
parents:
12644
diff
changeset
|
1213 call assert_match('Invalid region', temp) |
6fa9f6b4d159
patch 8.0.1243: no test for what 8.0.1227 fixes
Christian Brabandt <cb@256bit.org>
parents:
12644
diff
changeset
|
1214 let spellfile = matchstr(temp, 'Invalid region nr in \zs.*\ze line \d: 0') |
6fa9f6b4d159
patch 8.0.1243: no test for what 8.0.1227 fixes
Christian Brabandt <cb@256bit.org>
parents:
12644
diff
changeset
|
1215 call assert_equal(['# goood', '# goood/!', '#oood', '0/0'], readfile(spellfile)) |
6fa9f6b4d159
patch 8.0.1243: no test for what 8.0.1227 fixes
Christian Brabandt <cb@256bit.org>
parents:
12644
diff
changeset
|
1216 call delete(spellfile) |
6fa9f6b4d159
patch 8.0.1243: no test for what 8.0.1227 fixes
Christian Brabandt <cb@256bit.org>
parents:
12644
diff
changeset
|
1217 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1218 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1219 exe "lang" oldlang |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1220 call delete("./Xspellfile.add") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1221 call delete("./Xspellfile2.add") |
10130
de20f2434807
commit https://github.com/vim/vim/commit/df0db16cf74281a83a9ea3388a2ef9aedccd013c
Christian Brabandt <cb@256bit.org>
parents:
10124
diff
changeset
|
1222 call delete("./Xspellfile.add.spl") |
de20f2434807
commit https://github.com/vim/vim/commit/df0db16cf74281a83a9ea3388a2ef9aedccd013c
Christian Brabandt <cb@256bit.org>
parents:
10124
diff
changeset
|
1223 call delete("./Xspellfile2.add.spl") |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1224 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1225 " zux -> no-op |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1226 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1227 norm! $zux |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1228 call assert_equal([], glob('Xspellfile.add',0,1)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1229 call assert_equal([], glob('Xspellfile2.add',0,1)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1230 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1231 set spellfile= |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1232 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1233 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1234 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1235 func! Test_normal20_exmode() |
10092
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1236 if !has("unix") |
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1237 " Reading from redirected file doesn't work on MS-Windows |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1238 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1239 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1240 call writefile(['1a', 'foo', 'bar', '.', 'w! Xfile2', 'q!'], 'Xscript') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1241 call writefile(['1', '2'], 'Xfile') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1242 call system(v:progpath .' -e -s < Xscript Xfile') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1243 let a=readfile('Xfile2') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1244 call assert_equal(['1', 'foo', 'bar', '2'], a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1245 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1246 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1247 for file in ['Xfile', 'Xfile2', 'Xscript'] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1248 call delete(file) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1249 endfor |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1250 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1251 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1252 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1253 func! Test_normal21_nv_hat() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1254 set hidden |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1255 new |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1256 " to many buffers opened already, will not work |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1257 "call assert_fails(":b#", 'E23') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1258 "call assert_equal('', @#) |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1259 e Xfoobar |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1260 e Xfile2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1261 call feedkeys("\<c-^>", 't') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1262 call assert_equal("Xfile2", fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1263 call feedkeys("f\<c-^>", 't') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1264 call assert_equal("Xfile2", fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1265 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1266 set nohidden |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1267 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1268 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1269 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1270 func! Test_normal22_zet() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1271 " Test for ZZ |
10092
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1272 " let shell = &shell |
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1273 " let &shell = 'sh' |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1274 call writefile(['1', '2'], 'Xfile') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1275 let args = ' -u NONE -N -U NONE -i NONE --noplugins -X --not-a-term' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1276 call system(v:progpath . args . ' -c "%d" -c ":norm! ZZ" Xfile') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1277 let a = readfile('Xfile') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1278 call assert_equal([], a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1279 " Test for ZQ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1280 call writefile(['1', '2'], 'Xfile') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1281 call system(v:progpath . args . ' -c "%d" -c ":norm! ZQ" Xfile') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1282 let a = readfile('Xfile') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1283 call assert_equal(['1', '2'], a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1284 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1285 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1286 for file in ['Xfile'] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1287 call delete(file) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1288 endfor |
10092
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1289 " let &shell = shell |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1290 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1291 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1292 func! Test_normal23_K() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1293 " Test for K command |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1294 new |
10330
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1295 call append(0, ['version8.txt', 'man', 'aa%bb', 'cc|dd']) |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1296 let k = &keywordprg |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1297 set keywordprg=:help |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1298 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1299 norm! VK |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1300 call assert_equal('version8.txt', fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1301 call assert_equal('help', &ft) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1302 call assert_match('\*version8.txt\*', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1303 helpclose |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1304 norm! 0K |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1305 call assert_equal('version8.txt', fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1306 call assert_equal('help', &ft) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1307 call assert_match('\*version8\.0\*', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1308 helpclose |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1309 |
10330
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1310 set keywordprg=:new |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1311 set iskeyword+=% |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1312 set iskeyword+=\| |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1313 2 |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1314 norm! K |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1315 call assert_equal('man', fnamemodify(bufname('%'), ':t')) |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1316 bwipe! |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1317 3 |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1318 norm! K |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1319 call assert_equal('aa%bb', fnamemodify(bufname('%'), ':t')) |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1320 bwipe! |
10338
e8a6a3bbd212
commit https://github.com/vim/vim/commit/eb828d01d9c91791fa1fe217ba651cdc25746d1b
Christian Brabandt <cb@256bit.org>
parents:
10330
diff
changeset
|
1321 if !has('win32') |
e8a6a3bbd212
commit https://github.com/vim/vim/commit/eb828d01d9c91791fa1fe217ba651cdc25746d1b
Christian Brabandt <cb@256bit.org>
parents:
10330
diff
changeset
|
1322 4 |
e8a6a3bbd212
commit https://github.com/vim/vim/commit/eb828d01d9c91791fa1fe217ba651cdc25746d1b
Christian Brabandt <cb@256bit.org>
parents:
10330
diff
changeset
|
1323 norm! K |
e8a6a3bbd212
commit https://github.com/vim/vim/commit/eb828d01d9c91791fa1fe217ba651cdc25746d1b
Christian Brabandt <cb@256bit.org>
parents:
10330
diff
changeset
|
1324 call assert_equal('cc|dd', fnamemodify(bufname('%'), ':t')) |
e8a6a3bbd212
commit https://github.com/vim/vim/commit/eb828d01d9c91791fa1fe217ba651cdc25746d1b
Christian Brabandt <cb@256bit.org>
parents:
10330
diff
changeset
|
1325 bwipe! |
e8a6a3bbd212
commit https://github.com/vim/vim/commit/eb828d01d9c91791fa1fe217ba651cdc25746d1b
Christian Brabandt <cb@256bit.org>
parents:
10330
diff
changeset
|
1326 endif |
10330
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1327 set iskeyword-=% |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1328 set iskeyword-=\| |
71ca6a16e818
commit https://github.com/vim/vim/commit/426f3754223c8ff8a1bc51d6ba1eba11e8982ebc
Christian Brabandt <cb@256bit.org>
parents:
10166
diff
changeset
|
1329 |
10092
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1330 " Only expect "man" to work on Unix |
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1331 if !has("unix") |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1332 let &keywordprg = k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1333 bw! |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1334 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1335 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1336 set keywordprg=man\ --pager=cat |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1337 " Test for using man |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1338 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1339 let a = execute('unsilent norm! K') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1340 call assert_match("man --pager=cat 'man'", a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1341 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1342 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1343 let &keywordprg = k |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1344 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1345 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1346 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1347 func! Test_normal24_rot13() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1348 " This test uses multi byte characters |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1349 if !has("multi_byte") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1350 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1351 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1352 " Testing for g?? g?g? |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1353 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1354 call append(0, 'abcdefghijklmnopqrstuvwxyzäüö') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1355 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1356 norm! g?? |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1357 call assert_equal('nopqrstuvwxyzabcdefghijklmäüö', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1358 norm! g?g? |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1359 call assert_equal('abcdefghijklmnopqrstuvwxyzäüö', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1360 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1361 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1362 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1363 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1364 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1365 func! Test_normal25_tag() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1366 " Testing for CTRL-] g CTRL-] g] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1367 " CTRL-W g] CTRL-W CTRL-] CTRL-W g CTRL-] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1368 h |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1369 " Test for CTRL-] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1370 call search('\<x\>$') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1371 exe "norm! \<c-]>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1372 call assert_equal("change.txt", fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1373 norm! yiW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1374 call assert_equal("*x*", @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1375 exe ":norm \<c-o>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1376 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1377 " Test for g_CTRL-] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1378 call search('\<v_u\>$') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1379 exe "norm! g\<c-]>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1380 call assert_equal("change.txt", fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1381 norm! yiW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1382 call assert_equal("*v_u*", @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1383 exe ":norm \<c-o>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1384 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1385 " Test for g] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1386 call search('\<i_<Esc>$') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1387 let a = execute(":norm! g]") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1388 call assert_match('i_<Esc>.*insert.txt', a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1389 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1390 if !empty(exepath('cscope')) && has('cscope') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1391 " setting cscopetag changes how g] works |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1392 set cst |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1393 exe "norm! g]" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1394 call assert_equal("insert.txt", fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1395 norm! yiW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1396 call assert_equal("*i_<Esc>*", @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1397 exe ":norm \<c-o>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1398 " Test for CTRL-W g] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1399 exe "norm! \<C-W>g]" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1400 call assert_equal("insert.txt", fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1401 norm! yiW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1402 call assert_equal("*i_<Esc>*", @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1403 call assert_equal(3, winnr('$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1404 helpclose |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1405 set nocst |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1406 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1407 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1408 " Test for CTRL-W g] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1409 let a = execute("norm! \<C-W>g]") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1410 call assert_match('i_<Esc>.*insert.txt', a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1411 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1412 " Test for CTRL-W CTRL-] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1413 exe "norm! \<C-W>\<C-]>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1414 call assert_equal("insert.txt", fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1415 norm! yiW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1416 call assert_equal("*i_<Esc>*", @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1417 call assert_equal(3, winnr('$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1418 helpclose |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1419 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1420 " Test for CTRL-W g CTRL-] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1421 exe "norm! \<C-W>g\<C-]>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1422 call assert_equal("insert.txt", fnamemodify(bufname('%'), ':t')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1423 norm! yiW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1424 call assert_equal("*i_<Esc>*", @0) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1425 call assert_equal(3, winnr('$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1426 helpclose |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1427 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1428 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1429 helpclose |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1430 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1431 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1432 func! Test_normal26_put() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1433 " Test for ]p ]P [p and [P |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1434 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1435 call append(0, ['while read LINE', 'do', ' ((count++))', ' if [ $? -ne 0 ]; then', " echo 'Error writing file'", ' fi', 'done']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1436 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1437 /Error/y a |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1438 2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1439 norm! "a]pj"a[p |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1440 call assert_equal(['do', "echo 'Error writing file'", " echo 'Error writing file'", ' ((count++))'], getline(2,5)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1441 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1442 /^\s\{4}/ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1443 exe "norm! \"a]P3Eldt'" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1444 exe "norm! j\"a[P2Eldt'" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1445 call assert_equal([' if [ $? -ne 0 ]; then', " echo 'Error writing'", " echo 'Error'", " echo 'Error writing file'", ' fi'], getline(6,10)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1446 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1447 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1448 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1449 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1450 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1451 func! Test_normal27_bracket() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1452 " Test for [' [` ]' ]` |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1453 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1454 1,21s/.\+/ & b/ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1455 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1456 norm! $ma |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1457 5 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1458 norm! $mb |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1459 10 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1460 norm! $mc |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1461 15 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1462 norm! $md |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1463 20 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1464 norm! $me |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1465 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1466 " Test for [' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1467 9 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1468 norm! 2[' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1469 call assert_equal(' 1 b', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1470 call assert_equal(1, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1471 call assert_equal(3, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1472 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1473 " Test for ]' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1474 norm! ]' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1475 call assert_equal(' 5 b', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1476 call assert_equal(5, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1477 call assert_equal(3, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1478 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1479 " No mark after line 21, cursor moves to first non blank on current line |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1480 21 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1481 norm! $]' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1482 call assert_equal(' 21 b', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1483 call assert_equal(21, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1484 call assert_equal(3, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1485 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1486 " Test for [` |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1487 norm! 2[` |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1488 call assert_equal(' 15 b', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1489 call assert_equal(15, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1490 call assert_equal(8, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1491 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1492 " Test for ]` |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1493 norm! ]` |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1494 call assert_equal(' 20 b', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1495 call assert_equal(20, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1496 call assert_equal(8, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1497 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1498 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1499 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1500 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1501 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1502 func! Test_normal28_parenthesis() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1503 " basic testing for ( and ) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1504 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1505 call append(0, ['This is a test. With some sentences!', '', 'Even with a question? And one more. And no sentence here']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1506 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1507 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1508 norm! d( |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1509 call assert_equal(['This is a test. With some sentences!', '', 'Even with a question? And one more. ', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1510 norm! 2d( |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1511 call assert_equal(['This is a test. With some sentences!', '', ' ', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1512 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1513 norm! 0d) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1514 call assert_equal(['With some sentences!', '', ' ', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1515 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1516 call append('$', ['This is a long sentence', '', 'spanning', 'over several lines. ']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1517 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1518 norm! $d( |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1519 call assert_equal(['With some sentences!', '', ' ', '', 'This is a long sentence', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1520 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1521 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1522 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1523 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1524 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1525 fun! Test_normal29_brace() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1526 " basic test for { and } movements |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1527 let text= ['A paragraph begins after each empty line, and also at each of a set of', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1528 \ 'paragraph macros, specified by the pairs of characters in the ''paragraphs''', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1529 \ 'option. The default is "IPLPPPQPP TPHPLIPpLpItpplpipbp", which corresponds to', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1530 \ 'the macros ".IP", ".LP", etc. (These are nroff macros, so the dot must be in', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1531 \ 'the first column). A section boundary is also a paragraph boundary.', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1532 \ 'Note that a blank line (only containing white space) is NOT a paragraph', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1533 \ 'boundary.', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1534 \ '', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1535 \ '', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1536 \ 'Also note that this does not include a ''{'' or ''}'' in the first column. When', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1537 \ 'the ''{'' flag is in ''cpoptions'' then ''{'' in the first column is used as a', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1538 \ 'paragraph boundary |posix|.', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1539 \ '{', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1540 \ 'This is no paragaraph', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1541 \ 'unless the ''{'' is set', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1542 \ 'in ''cpoptions''', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1543 \ '}', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1544 \ '.IP', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1545 \ 'The nroff macros IP seperates a paragraph', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1546 \ 'That means, it must be a ''.''', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1547 \ 'followed by IP', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1548 \ '.LPIt does not matter, if afterwards some', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1549 \ 'more characters follow.', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1550 \ '.SHAlso section boundaries from the nroff', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1551 \ 'macros terminate a paragraph. That means', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1552 \ 'a character like this:', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1553 \ '.NH', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1554 \ 'End of text here'] |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1555 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1556 call append(0, text) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1557 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1558 norm! 0d2} |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1559 call assert_equal(['.IP', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1560 \ 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''', 'followed by IP', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1561 \ '.LPIt does not matter, if afterwards some', 'more characters follow.', '.SHAlso section boundaries from the nroff', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1562 \ 'macros terminate a paragraph. That means', 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1563 norm! 0d} |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1564 call assert_equal(['.LPIt does not matter, if afterwards some', 'more characters follow.', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1565 \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1566 \ 'a character like this:', '.NH', 'End of text here', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1567 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1568 norm! d{ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1569 call assert_equal(['.LPIt does not matter, if afterwards some', 'more characters follow.', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1570 \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', 'a character like this:', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1571 norm! d{ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1572 call assert_equal(['.LPIt does not matter, if afterwards some', 'more characters follow.', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1573 " Test with { in cpooptions |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1574 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1575 call append(0, text) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1576 set cpo+={ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1577 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1578 norm! 0d2} |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1579 call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1580 \ '.IP', 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1581 \ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1582 \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1583 \ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1584 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1585 norm! d} |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1586 call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1587 \ '.IP', 'The nroff macros IP seperates a paragraph', 'That means, it must be a ''.''', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1588 \ 'followed by IP', '.LPIt does not matter, if afterwards some', 'more characters follow.', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1589 \ '.SHAlso section boundaries from the nroff', 'macros terminate a paragraph. That means', |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1590 \ 'a character like this:', '.NH', 'End of text here', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1591 norm! gg} |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1592 norm! d5} |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1593 call assert_equal(['{', 'This is no paragaraph', 'unless the ''{'' is set', 'in ''cpoptions''', '}', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1594 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1595 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1596 set cpo-={ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1597 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1598 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1599 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1600 fun! Test_normal30_changecase() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1601 " This test uses multi byte characters |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1602 if !has("multi_byte") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1603 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1604 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1605 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1606 call append(0, 'This is a simple test: äüöß') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1607 norm! 1ggVu |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1608 call assert_equal('this is a simple test: äüöß', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1609 norm! VU |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1610 call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖSS', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1611 norm! guu |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1612 call assert_equal('this is a simple test: äüöss', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1613 norm! gUgU |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1614 call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖSS', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1615 norm! gugu |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1616 call assert_equal('this is a simple test: äüöss', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1617 norm! gUU |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1618 call assert_equal('THIS IS A SIMPLE TEST: ÄÜÖSS', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1619 norm! 010~ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1620 call assert_equal('this is a SIMPLE TEST: ÄÜÖSS', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1621 norm! V~ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1622 call assert_equal('THIS IS A simple test: äüöss', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1623 |
11335
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1624 " Turkish ASCII turns to multi-byte. On Mac the Turkish locale is available |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1625 " but toupper()/tolower() don't do the right thing. |
11339
2c655db9e0f6
patch 8.0.0555: toupper/tolower test fails on OSX without Darwin
Christian Brabandt <cb@256bit.org>
parents:
11337
diff
changeset
|
1626 if !has('mac') && !has('osx') |
11335
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1627 try |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1628 lang tr_TR.UTF-8 |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1629 set casemap= |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1630 call setline(1, 'iI') |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1631 1normal gUU |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1632 call assert_equal("\u0130I", getline(1)) |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1633 call assert_equal("\u0130I", toupper("iI")) |
11333
fef09eb74832
patch 8.0.0552: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11327
diff
changeset
|
1634 |
11335
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1635 call setline(1, 'iI') |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1636 1normal guu |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1637 call assert_equal("i\u0131", getline(1)) |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1638 call assert_equal("i\u0131", tolower("iI")) |
11333
fef09eb74832
patch 8.0.0552: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11327
diff
changeset
|
1639 |
11337
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1640 set casemap& |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1641 call setline(1, 'iI') |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1642 1normal gUU |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1643 call assert_equal("II", getline(1)) |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1644 call assert_equal("II", toupper("iI")) |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1645 |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1646 call setline(1, 'iI') |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1647 1normal guu |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1648 call assert_equal("ii", getline(1)) |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1649 call assert_equal("ii", tolower("iI")) |
f0fbebf19b80
patch 8.0.0554: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11335
diff
changeset
|
1650 |
11335
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1651 lang en_US.UTF-8 |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1652 catch /E197:/ |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1653 " can't use Turkish locale |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1654 throw 'Skipped: Turkish locale not available' |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1655 endtry |
bc8e3fd275be
patch 8.0.0553: toupper/tolower test fails on Mac
Christian Brabandt <cb@256bit.org>
parents:
11333
diff
changeset
|
1656 endif |
11333
fef09eb74832
patch 8.0.0552: toupper and tolower don't work properly for Turkish
Christian Brabandt <cb@256bit.org>
parents:
11327
diff
changeset
|
1657 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1658 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1659 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1660 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1661 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1662 fun! Test_normal31_r_cmd() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1663 " Test for r command |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1664 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1665 call append(0, 'This is a simple test: abcd') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1666 exe "norm! 1gg$r\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1667 call assert_equal(['This is a simple test: abc', '', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1668 exe "norm! 1gg2wlr\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1669 call assert_equal(['This is a', 'simple test: abc', '', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1670 exe "norm! 2gg0W5r\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1671 call assert_equal(['This is a', 'simple ', ' abc', '', ''], getline('1', '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1672 set autoindent |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1673 call setline(2, ['simple test: abc', '']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1674 exe "norm! 2gg0W5r\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1675 call assert_equal(['This is a', 'simple ', 'abc', '', '', ''], getline('1', '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1676 exe "norm! 1ggVr\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1677 call assert_equal('^M^M^M^M^M^M^M^M^M', strtrans(getline(1))) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1678 call setline(1, 'This is a') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1679 exe "norm! 1gg05rf" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1680 call assert_equal('fffffis a', getline(1)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1681 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1682 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1683 set noautoindent |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1684 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1685 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1686 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1687 func! Test_normal32_g_cmd1() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1688 " Test for g*, g# |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1689 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1690 call append(0, ['abc.x_foo', 'x_foobar.abc']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1691 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1692 norm! $g* |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1693 call assert_equal('x_foo', @/) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1694 call assert_equal('x_foobar.abc', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1695 norm! $g# |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1696 call assert_equal('abc', @/) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1697 call assert_equal('abc.x_foo', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1698 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1699 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1700 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1701 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1702 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1703 fun! Test_normal33_g_cmd2() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1704 if !has("jumplist") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1705 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1706 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1707 " Tests for g cmds |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1708 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1709 " Test for g` |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1710 clearjumps |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1711 norm! ma10j |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1712 let a=execute(':jumps') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1713 " empty jumplist |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1714 call assert_equal('>', a[-1:]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1715 norm! g`a |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1716 call assert_equal('>', a[-1:]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1717 call assert_equal(1, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1718 call assert_equal('1', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1719 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1720 " Test for g; and g, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1721 norm! g; |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1722 " there is only one change in the changelist |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1723 " currently, when we setup the window |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1724 call assert_equal(2, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1725 call assert_fails(':norm! g;', 'E662') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1726 call assert_fails(':norm! g,', 'E663') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1727 let &ul=&ul |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1728 call append('$', ['a', 'b', 'c', 'd']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1729 let &ul=&ul |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1730 call append('$', ['Z', 'Y', 'X', 'W']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1731 let a = execute(':changes') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1732 call assert_match('2\s\+0\s\+2', a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1733 call assert_match('101\s\+0\s\+a', a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1734 call assert_match('105\s\+0\s\+Z', a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1735 norm! 3g; |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1736 call assert_equal(2, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1737 norm! 2g, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1738 call assert_equal(105, line('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1739 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1740 " Test for g& - global substitute |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1741 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1742 call setline(1, range(1,10)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1743 call append('$', ['a', 'b', 'c', 'd']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1744 $s/\w/&&/g |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1745 exe "norm! /[1-8]\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1746 norm! g& |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1747 call assert_equal(['11', '22', '33', '44', '55', '66', '77', '88', '9', '110', 'a', 'b', 'c', 'dd'], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1748 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1749 " Test for gv |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1750 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1751 call append('$', repeat(['abcdefgh'], 8)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1752 exe "norm! 2gg02l\<c-v>2j2ly" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1753 call assert_equal(['cde', 'cde', 'cde'], getreg(0, 1, 1)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1754 " in visual mode, gv swaps current and last selected region |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1755 exe "norm! G0\<c-v>4k4lgvd" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1756 call assert_equal(['', 'abfgh', 'abfgh', 'abfgh', 'abcdefgh', 'abcdefgh', 'abcdefgh', 'abcdefgh', 'abcdefgh'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1757 exe "norm! G0\<c-v>4k4ly" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1758 exe "norm! gvood" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1759 call assert_equal(['', 'abfgh', 'abfgh', 'abfgh', 'fgh', 'fgh', 'fgh', 'fgh', 'fgh'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1760 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1761 " Test for gk/gj |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1762 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1763 15vsp |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1764 set wrap listchars= sbr= |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1765 let lineA='abcdefghijklmnopqrstuvwxyz' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1766 let lineB='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1767 $put =lineA |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1768 $put =lineB |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1769 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1770 norm! 3gg0dgk |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1771 call assert_equal(['', 'abcdefghijklmno', '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1772 set nu |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1773 norm! 3gg0gjdgj |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1774 call assert_equal(['', 'abcdefghijklmno', '0123456789AMNOPQRSTUVWXYZ'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1775 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1776 " Test for gJ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1777 norm! 2gggJ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1778 call assert_equal(['', 'abcdefghijklmno0123456789AMNOPQRSTUVWXYZ'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1779 call assert_equal(16, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1780 " shouldn't do anything |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1781 norm! 10gJ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1782 call assert_equal(1, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1783 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1784 " Test for g0 g^ gm g$ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1785 exe "norm! 2gg0gji " |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1786 call assert_equal(['', 'abcdefghijk lmno0123456789AMNOPQRSTUVWXYZ'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1787 norm! g0yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1788 call assert_equal(12, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1789 call assert_equal(' ', getreg(0)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1790 norm! g$yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1791 call assert_equal(22, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1792 call assert_equal('3', getreg(0)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1793 norm! gmyl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1794 call assert_equal(17, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1795 call assert_equal('n', getreg(0)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1796 norm! g^yl |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1797 call assert_equal(15, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1798 call assert_equal('l', getreg(0)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1799 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1800 " Test for g Ctrl-G |
10092
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1801 set ff=unix |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1802 let a=execute(":norm! g\<c-g>") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1803 call assert_match('Col 15 of 43; Line 2 of 2; Word 2 of 2; Byte 16 of 45', a) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1804 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1805 " Test for gI |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1806 norm! gIfoo |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1807 call assert_equal(['', 'fooabcdefghijk lmno0123456789AMNOPQRSTUVWXYZ'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1808 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1809 " Test for gi |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1810 wincmd c |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1811 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1812 set tw=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1813 call setline(1, ['foobar', 'new line']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1814 norm! A next word |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1815 $put ='third line' |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1816 norm! gi another word |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1817 call assert_equal(['foobar next word another word', 'new line', 'third line'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1818 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1819 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1820 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1821 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1822 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1823 fun! Test_normal34_g_cmd3() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1824 if !has("multi_byte") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1825 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1826 endif |
11327
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1827 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1828 " Test for g8 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1829 new |
11327
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1830 let a=execute(':norm! 1G0g8') |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1831 call assert_equal("\nNUL", a) |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1832 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1833 call setline(1, 'abcdefghijklmnopqrstuvwxyzäüö') |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1834 let a=execute(':norm! 1G$g8') |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1835 call assert_equal("\nc3 b6 ", a) |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1836 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1837 call setline(1, "a\u0302") |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1838 let a=execute(':norm! 1G0g8') |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1839 call assert_equal("\n61 + cc 82 ", a) |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1840 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1841 " clean up |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1842 bw! |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1843 endfunc |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1844 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1845 func Test_normal_8g8() |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1846 if !has("multi_byte") |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1847 return |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1848 endif |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1849 new |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1850 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1851 " Test 8g8 which finds invalid utf8 at or after the cursor. |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1852 |
11327
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1853 " With invalid byte. |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1854 call setline(1, "___\xff___") |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1855 norm! 1G08g8g |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1856 call assert_equal([0, 1, 4, 0, 1], getcurpos()) |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1857 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1858 " With invalid byte before the cursor. |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1859 call setline(1, "___\xff___") |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1860 norm! 1G$h8g8g |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1861 call assert_equal([0, 1, 6, 0, 9], getcurpos()) |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1862 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1863 " With truncated sequence. |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1864 call setline(1, "___\xE2\x82___") |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1865 norm! 1G08g8g |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1866 call assert_equal([0, 1, 4, 0, 1], getcurpos()) |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1867 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1868 " With overlong sequence. |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1869 call setline(1, "___\xF0\x82\x82\xAC___") |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1870 norm! 1G08g8g |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1871 call assert_equal([0, 1, 4, 0, 1], getcurpos()) |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1872 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1873 " With valid utf8. |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1874 call setline(1, "café") |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1875 norm! 1G08g8 |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1876 call assert_equal([0, 1, 1, 0, 1], getcurpos()) |
9e899514e929
patch 8.0.0549: no test for the 8g8 command
Christian Brabandt <cb@256bit.org>
parents:
11275
diff
changeset
|
1877 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1878 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1879 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1880 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1881 fun! Test_normal35_g_cmd4() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1882 " Test for g< |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1883 " Cannot capture its output, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1884 " probably a bug, therefore, test disabled: |
10124
f6942ed9e998
commit https://github.com/vim/vim/commit/31845093b7f1b33e0c7e9e592bef65528674a1f2
Christian Brabandt <cb@256bit.org>
parents:
10104
diff
changeset
|
1885 throw "Skipped: output of g< can't be tested currently" |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1886 echo "a\nb\nc\nd" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1887 let b=execute(':norm! g<') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1888 call assert_true(!empty(b), 'failed `execute(g<)`') |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1889 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1890 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1891 fun! Test_normal36_g_cmd5() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1892 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1893 call append(0, 'abcdefghijklmnopqrstuvwxyz') |
10092
d7846e9fbf65
commit https://github.com/vim/vim/commit/0913a1089a07ac7b17abc3a1343dfa7cd25613f4
Christian Brabandt <cb@256bit.org>
parents:
10088
diff
changeset
|
1894 set ff=unix |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1895 " Test for gp gP |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1896 call append(1, range(1,10)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1897 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1898 norm! 1yy |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1899 3 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1900 norm! gp |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1901 call assert_equal([0, 5, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1902 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1903 norm! gP |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1904 call assert_equal([0, 14, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1905 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1906 " Test for go |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1907 norm! 26go |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1908 call assert_equal([0, 1, 26, 0, 26], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1909 norm! 27go |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1910 call assert_equal([0, 1, 26, 0, 26], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1911 norm! 28go |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1912 call assert_equal([0, 2, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1913 set ff=dos |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1914 norm! 29go |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1915 call assert_equal([0, 2, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1916 set ff=unix |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1917 norm! gg0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1918 norm! 101go |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1919 call assert_equal([0, 13, 26, 0, 26], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1920 norm! 103go |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1921 call assert_equal([0, 14, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1922 " count > buffer content |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1923 norm! 120go |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1924 call assert_equal([0, 14, 1, 0, 2147483647], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1925 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1926 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1927 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1928 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1929 fun! Test_normal37_g_cmd6() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1930 " basic test for gt and gT |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1931 tabnew 1.txt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1932 tabnew 2.txt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1933 tabnew 3.txt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1934 norm! 1gt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1935 call assert_equal(1, tabpagenr()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1936 norm! 3gt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1937 call assert_equal(3, tabpagenr()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1938 norm! 1gT |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1939 " count gT goes not to the absolute tabpagenumber |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1940 " but, but goes to the count previous tabpagenumber |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1941 call assert_equal(2, tabpagenr()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1942 " wrap around |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1943 norm! 3gT |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1944 call assert_equal(3, tabpagenr()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1945 " gt does not wrap around |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1946 norm! 5gt |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1947 call assert_equal(3, tabpagenr()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1948 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1949 for i in range(3) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1950 tabclose |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1951 endfor |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1952 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1953 call assert_fails(':tabclose', 'E784') |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1954 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1955 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1956 fun! Test_normal38_nvhome() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1957 " Test for <Home> and <C-Home> key |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1958 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1959 call setline(1, range(10)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1960 $ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1961 setl et sw=2 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1962 norm! V10>$ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1963 " count is ignored |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1964 exe "norm! 10\<home>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1965 call assert_equal(1, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1966 exe "norm! \<home>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1967 call assert_equal([0, 10, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1968 exe "norm! 5\<c-home>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1969 call assert_equal([0, 5, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1970 exe "norm! \<c-home>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1971 call assert_equal([0, 1, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1972 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1973 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1974 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1975 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1976 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1977 fun! Test_normal39_cw() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1978 " Test for cw and cW on whitespace |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1979 " and cpo+=w setting |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1980 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1981 set tw=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1982 call append(0, 'here are some words') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1983 norm! 1gg0elcwZZZ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1984 call assert_equal('hereZZZare some words', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1985 norm! 1gg0elcWYYY |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1986 call assert_equal('hereZZZareYYYsome words', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1987 set cpo+=w |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1988 call setline(1, 'here are some words') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1989 norm! 1gg0elcwZZZ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1990 call assert_equal('hereZZZ are some words', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1991 norm! 1gg2elcWYYY |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1992 call assert_equal('hereZZZ areYYY some words', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1993 set cpo-=w |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1994 norm! 2gg0cwfoo |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1995 call assert_equal('foo', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1996 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1997 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1998 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
1999 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2000 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2001 fun! Test_normal40_ctrl_bsl() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2002 " Basic test for CTRL-\ commands |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2003 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2004 call append(0, 'here are some words') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2005 exe "norm! 1gg0a\<C-\>\<C-N>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2006 call assert_equal('n', mode()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2007 call assert_equal(1, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2008 call assert_equal('', visualmode()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2009 exe "norm! 1gg0viw\<C-\>\<C-N>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2010 call assert_equal('n', mode()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2011 call assert_equal(4, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2012 exe "norm! 1gg0a\<C-\>\<C-G>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2013 call assert_equal('n', mode()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2014 call assert_equal(1, col('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2015 "imap <buffer> , <c-\><c-n> |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2016 set im |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2017 exe ":norm! \<c-\>\<c-n>dw" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2018 set noim |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2019 call assert_equal('are some words', getline(1)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2020 call assert_false(&insertmode) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2021 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2022 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2023 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2024 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2025 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2026 fun! Test_normal41_insert_reg() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2027 " Test for <c-r>=, <c-r><c-r>= and <c-r><c-o>= |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2028 " in insert mode |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2029 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2030 set sts=2 sw=2 ts=8 tw=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2031 call append(0, ["aaa\tbbb\tccc", '', '', '']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2032 let a=getline(1) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2033 norm! 2gg0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2034 exe "norm! a\<c-r>=a\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2035 norm! 3gg0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2036 exe "norm! a\<c-r>\<c-r>=a\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2037 norm! 4gg0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2038 exe "norm! a\<c-r>\<c-o>=a\<cr>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2039 call assert_equal(['aaa bbb ccc', 'aaa bbb ccc', 'aaa bbb ccc', 'aaa bbb ccc', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2040 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2041 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2042 set sts=0 sw=8 ts=8 |
10124
f6942ed9e998
commit https://github.com/vim/vim/commit/31845093b7f1b33e0c7e9e592bef65528674a1f2
Christian Brabandt <cb@256bit.org>
parents:
10104
diff
changeset
|
2043 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2044 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2045 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2046 func! Test_normal42_halfpage() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2047 " basic test for Ctrl-D and Ctrl-U |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2048 call Setup_NewWindow() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2049 call assert_equal(5, &scroll) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2050 exe "norm! \<c-d>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2051 call assert_equal('6', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2052 exe "norm! 2\<c-d>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2053 call assert_equal('8', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2054 call assert_equal(2, &scroll) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2055 set scroll=5 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2056 exe "norm! \<c-u>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2057 call assert_equal('3', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2058 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2059 set scrolloff=5 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2060 exe "norm! \<c-d>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2061 call assert_equal('10', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2062 exe "norm! \<c-u>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2063 call assert_equal('5', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2064 1 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2065 set scrolloff=99 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2066 exe "norm! \<c-d>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2067 call assert_equal('10', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2068 set scrolloff=0 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2069 100 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2070 exe "norm! $\<c-u>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2071 call assert_equal('95', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2072 call assert_equal([0, 95, 1, 0, 1], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2073 100 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2074 set nostartofline |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2075 exe "norm! $\<c-u>" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2076 call assert_equal('95', getline('.')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2077 call assert_equal([0, 95, 2, 0, 2147483647], getcurpos()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2078 " cleanup |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2079 set startofline |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2080 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2081 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2082 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2083 fun! Test_normal43_textobject1() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2084 " basic tests for text object aw |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2085 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2086 call append(0, ['foobar,eins,foobar', 'foo,zwei,foo ']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2087 " diw |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2088 norm! 1gg0diw |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2089 call assert_equal([',eins,foobar', 'foo,zwei,foo ', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2090 " daw |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2091 norm! 2ggEdaw |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2092 call assert_equal([',eins,foobar', 'foo,zwei,', ''], getline(1, '$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2093 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2094 call append(0, ["foo\teins\tfoobar", "foo\tzwei\tfoo "]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2095 " diW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2096 norm! 2ggwd2iW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2097 call assert_equal(['foo eins foobar', 'foo foo ', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2098 " daW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2099 norm! 1ggd2aW |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2100 call assert_equal(['foobar', 'foo foo ', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2101 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2102 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2103 call append(0, ["foo\teins\tfoobar", "foo\tzwei\tfoo "]) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2104 " aw in visual line mode switches to characterwise mode |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2105 norm! 2gg$Vawd |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2106 call assert_equal(['foo eins foobar', 'foo zwei foo'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2107 norm! 1gg$Viwd |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2108 call assert_equal(['foo eins ', 'foo zwei foo'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2109 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2110 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2111 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2112 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2113 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2114 func! Test_normal44_textobjects2() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2115 " basic testing for is and as text objects |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2116 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2117 call append(0, ['This is a test. With some sentences!', '', 'Even with a question? And one more. And no sentence here']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2118 " Test for dis - does not remove trailing whitespace |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2119 norm! 1gg0dis |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2120 call assert_equal([' With some sentences!', '', 'Even with a question? And one more. And no sentence here', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2121 " Test for das - removes leading whitespace |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2122 norm! 3ggf?ldas |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2123 call assert_equal([' With some sentences!', '', 'Even with a question? And no sentence here', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2124 " when used in visual mode, is made characterwise |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2125 norm! 3gg$Visy |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2126 call assert_equal('v', visualmode()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2127 " reset visualmode() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2128 norm! 3ggVy |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2129 norm! 3gg$Vasy |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2130 call assert_equal('v', visualmode()) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2131 " basic testing for textobjects a< and at |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2132 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2133 call setline(1, ['<div> ','<a href="foobar" class="foo">xyz</a>',' </div>', ' ']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2134 " a< |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2135 norm! 1gg0da< |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2136 call assert_equal([' ', '<a href="foobar" class="foo">xyz</a>', ' </div>', ' '], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2137 norm! 1pj |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2138 call assert_equal([' <div>', '<a href="foobar" class="foo">xyz</a>', ' </div>', ' '], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2139 " at |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2140 norm! d2at |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2141 call assert_equal([' '], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2142 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2143 call setline(1, ['<div> ','<a href="foobar" class="foo">xyz</a>',' </div>', ' ']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2144 " i< |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2145 norm! 1gg0di< |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2146 call assert_equal(['<> ', '<a href="foobar" class="foo">xyz</a>', ' </div>', ' '], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2147 norm! 1Pj |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2148 call assert_equal(['<div> ', '<a href="foobar" class="foo">xyz</a>', ' </div>', ' '], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2149 norm! d2it |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2150 call assert_equal(['<div></div>',' '], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2151 " basic testing for a[ and i[ text object |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2152 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2153 call setline(1, [' ', '[', 'one [two]', 'thre', ']']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2154 norm! 3gg0di[ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2155 call assert_equal([' ', '[', ']'], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2156 call setline(1, [' ', '[', 'one [two]', 'thre', ']']) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2157 norm! 3gg0ftd2a[ |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2158 call assert_equal([' '], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2159 %d |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2160 " Test for i" when cursor is in front of a quoted object |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2161 call append(0, 'foo "bar"') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2162 norm! 1gg0di" |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2163 call assert_equal(['foo ""', ''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2164 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2165 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2166 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2167 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2168 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2169 func! Test_normal45_drop() |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2170 if !has("dnd") |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2171 return |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2172 endif |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2173 " basic test for :drop command |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2174 " unfortunately, without a gui, we can't really test much here, |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2175 " so simply test that ~p fails (which uses the drop register) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2176 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2177 call assert_fails(':norm! "~p', 'E353') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2178 call assert_equal([], getreg('~', 1, 1)) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2179 " the ~ register is read only |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2180 call assert_fails(':let @~="1"', 'E354') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2181 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2182 endfunc |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2183 |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2184 func! Test_normal46_ignore() |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2185 " This test uses multi byte characters |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2186 if !has("multi_byte") |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2187 return |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2188 endif |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2189 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2190 new |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2191 " How to test this? |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2192 " let's just for now test, that the buffer |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2193 " does not change |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2194 call feedkeys("\<c-s>", 't') |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2195 call assert_equal([''], getline(1,'$')) |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2196 |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2197 " no valid commands |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2198 exe "norm! \<char-0x100>" |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2199 call assert_equal([''], getline(1,'$')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2200 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2201 exe "norm! ä" |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2202 call assert_equal([''], getline(1,'$')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2203 |
10088
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2204 " clean up |
5337340beea0
commit https://github.com/vim/vim/commit/87bc3f74598ae8c648957e5755000cc6cdbc89ce
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2205 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2206 endfunc |
10154
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2207 |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2208 func! Test_normal47_visual_buf_wipe() |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2209 " This was causing a crash or ml_get error. |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2210 enew! |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2211 call setline(1,'xxx') |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2212 normal $ |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2213 new |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2214 call setline(1, range(1,2)) |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2215 2 |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2216 exe "norm \<C-V>$" |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2217 bw! |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2218 norm yp |
4647267906cc
commit https://github.com/vim/vim/commit/c4a908e83690844b0d3a46124ba6af7d23485d69
Christian Brabandt <cb@256bit.org>
parents:
10130
diff
changeset
|
2219 set nomodified |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2220 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2221 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2222 func! Test_normal47_autocmd() |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2223 " disabled, does not seem to be possible currently |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2224 throw "Skipped: not possible to test cursorhold autocmd while waiting for input in normal_cmd" |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2225 new |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2226 call append(0, repeat('-',20)) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2227 au CursorHold * call feedkeys('2l', '') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2228 1 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2229 set updatetime=20 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2230 " should delete 12 chars (d12l) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2231 call feedkeys('d1', '!') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2232 call assert_equal('--------', getline(1)) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2233 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2234 " clean up |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2235 au! CursorHold |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2236 set updatetime=4000 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2237 bw! |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2238 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2239 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2240 func! Test_normal48_wincmd() |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2241 new |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2242 exe "norm! \<c-w>c" |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2243 call assert_equal(1, winnr('$')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2244 call assert_fails(":norm! \<c-w>c", "E444") |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2245 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2246 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2247 func! Test_normal49_counts() |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2248 new |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2249 call setline(1, 'one two three four five six seven eight nine ten') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2250 1 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2251 norm! 3d2w |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2252 call assert_equal('seven eight nine ten', getline(1)) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2253 bw! |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2254 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2255 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2256 func! Test_normal50_commandline() |
12477
68d7bc045dbe
patch 8.0.1118: FEAT_WINDOWS adds a lot of #ifdefs
Christian Brabandt <cb@256bit.org>
parents:
12421
diff
changeset
|
2257 if !has("timers") || !has("cmdline_hist") |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2258 return |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2259 endif |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2260 func! DoTimerWork(id) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2261 call assert_equal('[Command Line]', bufname('')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2262 " should fail, with E11, but does fail with E23? |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2263 "call feedkeys("\<c-^>", 'tm') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2264 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2265 " should also fail with E11 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2266 call assert_fails(":wincmd p", 'E11') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2267 " return from commandline window |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2268 call feedkeys("\<cr>") |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2269 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2270 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2271 let oldlang=v:lang |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2272 lang C |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2273 set updatetime=20 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2274 call timer_start(100, 'DoTimerWork') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2275 try |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2276 " throws E23, for whatever reason... |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2277 call feedkeys('q:', 'x!') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2278 catch /E23/ |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2279 " no-op |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2280 endtry |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2281 " clean up |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2282 set updatetime=4000 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2283 exe "lang" oldlang |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2284 bw! |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2285 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2286 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2287 func! Test_normal51_FileChangedRO() |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2288 if !has("autocmd") |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2289 return |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2290 endif |
10807
82c43bca568e
patch 8.0.0293: some tests have a one or three second wait
Christian Brabandt <cb@256bit.org>
parents:
10579
diff
changeset
|
2291 " Don't sleep after the warning message. |
82c43bca568e
patch 8.0.0293: some tests have a one or three second wait
Christian Brabandt <cb@256bit.org>
parents:
10579
diff
changeset
|
2292 call test_settime(1) |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2293 call writefile(['foo'], 'Xreadonly.log') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2294 new Xreadonly.log |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2295 setl ro |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2296 au FileChangedRO <buffer> :call feedkeys("\<c-^>", 'tix') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2297 call assert_fails(":norm! Af", 'E788') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2298 call assert_equal(['foo'], getline(1,'$')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2299 call assert_equal('Xreadonly.log', bufname('')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2300 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2301 " cleanup |
10807
82c43bca568e
patch 8.0.0293: some tests have a one or three second wait
Christian Brabandt <cb@256bit.org>
parents:
10579
diff
changeset
|
2302 call test_settime(0) |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2303 bw! |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2304 call delete("Xreadonly.log") |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2305 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2306 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2307 func! Test_normal52_rl() |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2308 if !has("rightleft") |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2309 return |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2310 endif |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2311 new |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2312 call setline(1, 'abcde fghij klmnopq') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2313 norm! 1gg$ |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2314 set rl |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2315 call assert_equal(19, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2316 call feedkeys('l', 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2317 call assert_equal(18, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2318 call feedkeys('h', 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2319 call assert_equal(19, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2320 call feedkeys("\<right>", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2321 call assert_equal(18, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2322 call feedkeys("\<s-right>", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2323 call assert_equal(13, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2324 call feedkeys("\<c-right>", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2325 call assert_equal(7, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2326 call feedkeys("\<c-left>", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2327 call assert_equal(13, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2328 call feedkeys("\<s-left>", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2329 call assert_equal(19, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2330 call feedkeys("<<", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2331 call assert_equal(' abcde fghij klmnopq',getline(1)) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2332 call feedkeys(">>", 'tx') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2333 call assert_equal('abcde fghij klmnopq',getline(1)) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2334 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2335 " cleanup |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2336 set norl |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2337 bw! |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2338 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2339 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2340 func! Test_normal53_digraph() |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2341 if !has('digraphs') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2342 return |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2343 endif |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2344 new |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2345 call setline(1, 'abcdefgh|') |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2346 exe "norm! 1gg0f\<c-k>!!" |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2347 call assert_equal(9, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2348 set cpo+=D |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2349 exe "norm! 1gg0f\<c-k>!!" |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2350 call assert_equal(1, col('.')) |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2351 |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2352 set cpo-=D |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2353 bw! |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2354 endfunc |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2355 |
11260
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2356 func Test_normal54_Ctrl_bsl() |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2357 new |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2358 call setline(1, 'abcdefghijklmn') |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2359 exe "norm! df\<c-\>\<c-n>" |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2360 call assert_equal(['abcdefghijklmn'], getline(1,'$')) |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2361 exe "norm! df\<c-\>\<c-g>" |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2362 call assert_equal(['abcdefghijklmn'], getline(1,'$')) |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2363 exe "norm! df\<c-\>m" |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2364 call assert_equal(['abcdefghijklmn'], getline(1,'$')) |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2365 if !has("multi_byte") |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2366 return |
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2367 endif |
11260
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2368 call setline(2, 'abcdefghijklmnāf') |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2369 norm! 2gg0 |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2370 exe "norm! df\<Char-0x101>" |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2371 call assert_equal(['abcdefghijklmn', 'f'], getline(1,'$')) |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2372 norm! 1gg0 |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2373 exe "norm! df\<esc>" |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2374 call assert_equal(['abcdefghijklmn', 'f'], getline(1,'$')) |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2375 |
11260
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2376 " clean up |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2377 bw! |
10166
520e0e732b87
commit https://github.com/vim/vim/commit/2931f2a5df0d962032d41060af84d9fd2cb35c9f
Christian Brabandt <cb@256bit.org>
parents:
10154
diff
changeset
|
2378 endfunc |
11260
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2379 |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2380 func Test_normal_large_count() |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2381 " This may fail with 32bit long, how do we detect that? |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2382 new |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2383 normal o |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2384 normal 6666666666dL |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2385 bwipe! |
a7b7b21071c6
patch 8.0.0516: a large count on a normal command causes trouble
Christian Brabandt <cb@256bit.org>
parents:
11091
diff
changeset
|
2386 endfunc |
11275
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2387 |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2388 func Test_delete_until_paragraph() |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2389 if !has('multi_byte') |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2390 return |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2391 endif |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2392 new |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2393 normal grádv} |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2394 call assert_equal('á', getline(1)) |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2395 normal grád} |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2396 call assert_equal('', getline(1)) |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2397 bwipe! |
5c77ca0cf6a5
patch 8.0.0523: dv} deletes part of a multi-byte character.
Christian Brabandt <cb@256bit.org>
parents:
11260
diff
changeset
|
2398 endfunc |