annotate src/testdir/test45.in @ 2717:f85fe1a05c2a v7.3.133

updated for version 7.3.133 Problem: When using encryption it's not clear what method was used. Solution: In the file message show "blowfish" when using blowfish.
author Bram Moolenaar <bram@vim.org>
date Fri, 25 Feb 2011 16:52:17 +0100
parents c11845a465ae
children b85fcd9b858d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 Tests for folding. vim: set ft=vim :
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 STARTTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 :so small.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 :" We also need the +syntax feature here.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :if !has("syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 e! test.ok
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 w! test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 :" basic test if a fold can be created, opened, moving to the end and closed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 /^1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 zf2j:call append("$", "manual " . getline(foldclosed(".")))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 zo:call append("$", foldclosed("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 ]z:call append("$", getline("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 zc:call append("$", getline(foldclosed(".")))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 :" test folding with markers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 :set fdm=marker fdl=1 fdc=3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 /^5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 :call append("$", "marker " . foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 [z:call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 jo{{ r{jj:call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 kYpj:call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 :" test folding with indent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 :set fdm=indent sw=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 /^2 b
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 i jI :call append("$", "indent " . foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 k:call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 :" test syntax folding
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 :set fdm=syntax fdl=0
1977
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
31 :syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
32 :syn region Fd1 start="ee" end="ff" fold contained
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
33 :syn region Fd2 start="gg" end="hh" fold contained
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
34 :syn region Fd3 start="commentstart" end="commentend" fold contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 Gzk:call append("$", "folding " . getline("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 k:call append("$", getline("."))
1977
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
37 jAcommentstart Acommentend:set fdl=1
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
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 zO j:call append("$", getline("."))
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 :" test expression folding
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 :fun Flvl()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 let l = getline(v:lnum)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 if l =~ "bb$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 return 2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 elseif l =~ "gg$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 return "s1"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 elseif l =~ "ii$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 return ">2"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 elseif l =~ "kk$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 return "0"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 return "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 :set fdm=expr fde=Flvl()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 /bb$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 :call append("$", "expr " . foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 /hh$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 :call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 /ii$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 :call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 /kk$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 :call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 :/^last/+1,$w! test.out
1405
b63792dadc23 updated for version 7.1-120
vimboss
parents: 7
diff changeset
65 :delfun Flvl
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 1 aa
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 2 bb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 3 cc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 4 dd {{{
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 5 ee {{{ }}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 6 ff }}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 7 gg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 8 hh
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 9 ii
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 a jj
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 b kk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 last