Mercurial > vim
annotate src/testdir/test45.in @ 10627:fb9c28aca006 v8.0.0203
patch 8.0.0203: order of complication flags is sometimes wrong
commit https://github.com/vim/vim/commit/6e78e27b8aace2e4c2412bfc4de6567509258d28
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 17 19:20:15 2017 +0100
patch 8.0.0203: order of complication flags is sometimes wrong
Problem: Order of complication flags is sometimes wrong.
Solution: Put interface-specific flags before ALL_CFLAGS. (idea by Yousong
Zhou, closes #1100)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 17 Jan 2017 19:30:04 +0100 |
parents | b85fcd9b858d |
children | ae45d497868f |
rev | line source |
---|---|
7 | 1 Tests for folding. vim: set ft=vim : |
2 | |
3 STARTTEST | |
4 :so small.vim | |
5 :" We also need the +syntax feature here. | |
6 :if !has("syntax") | |
7 e! test.ok | |
8 w! test.out | |
9 qa! | |
10 :endif | |
11 :" basic test if a fold can be created, opened, moving to the end and closed | |
12 /^1 | |
13 zf2j:call append("$", "manual " . getline(foldclosed("."))) | |
14 zo:call append("$", foldclosed(".")) | |
15 ]z:call append("$", getline(".")) | |
16 zc:call append("$", getline(foldclosed("."))) | |
17 :" test folding with markers. | |
18 :set fdm=marker fdl=1 fdc=3 | |
19 /^5 | |
20 :call append("$", "marker " . foldlevel(".")) | |
21 [z:call append("$", foldlevel(".")) | |
22 jo{{ r{jj:call append("$", foldlevel(".")) | |
23 kYpj:call append("$", foldlevel(".")) | |
24 :" test folding with indent | |
25 :set fdm=indent sw=2 | |
26 /^2 b | |
27 i jI :call append("$", "indent " . foldlevel(".")) | |
28 k:call append("$", foldlevel(".")) | |
29 :" test syntax folding | |
30 :set fdm=syntax fdl=0 | |
1977 | 31 :syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3 |
32 :syn region Fd1 start="ee" end="ff" fold contained | |
33 :syn region Fd2 start="gg" end="hh" fold contained | |
34 :syn region Fd3 start="commentstart" end="commentend" fold contained | |
7 | 35 Gzk:call append("$", "folding " . getline(".")) |
36 k:call append("$", getline(".")) | |
1977 | 37 jAcommentstart Acommentend:set fdl=1 |
38 3j:call append("$", getline(".")) | |
2086
c11845a465ae
updated for version 7.2.370
Bram Moolenaar <bram@zimbu.org>
parents:
1977
diff
changeset
|
39 :set fdl=0 |
c11845a465ae
updated for version 7.2.370
Bram Moolenaar <bram@zimbu.org>
parents:
1977
diff
changeset
|
40 zOj:call append("$", getline(".")) |
7 | 41 :" test expression folding |
42 :fun Flvl() | |
43 let l = getline(v:lnum) | |
44 if l =~ "bb$" | |
45 return 2 | |
46 elseif l =~ "gg$" | |
47 return "s1" | |
48 elseif l =~ "ii$" | |
49 return ">2" | |
50 elseif l =~ "kk$" | |
51 return "0" | |
52 endif | |
53 return "=" | |
54 endfun | |
55 :set fdm=expr fde=Flvl() | |
56 /bb$ | |
57 :call append("$", "expr " . foldlevel(".")) | |
58 /hh$ | |
59 :call append("$", foldlevel(".")) | |
60 /ii$ | |
61 :call append("$", foldlevel(".")) | |
62 /kk$ | |
63 :call append("$", foldlevel(".")) | |
64 :/^last/+1,$w! test.out | |
1405 | 65 :delfun Flvl |
6755 | 66 :new |
67 iTest fdm=indent and :move bug END | |
68 line2 | |
69 Test fdm=indent START | |
70 line3 | |
71 line4 | |
72 :set fdm=indent | |
73 :1m1 | |
74 2jzc:m0 | |
75 :%w >> test.out | |
7 | 76 :qa! |
77 ENDTEST | |
78 | |
79 1 aa | |
80 2 bb | |
81 3 cc | |
82 4 dd {{{ | |
83 5 ee {{{ }}} | |
84 6 ff }}} | |
85 7 gg | |
86 8 hh | |
87 9 ii | |
88 a jj | |
89 b kk | |
90 last |