annotate src/testdir/test45.in @ 11091:ae45d497868f v8.0.0433

patch 8.0.0433: beeps when running tests commit https://github.com/vim/vim/commit/c3c766ea8c35f5b2bd45fb3d74d0ae46b2d8c24f Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 8 22:55:19 2017 +0100 patch 8.0.0433: beeps when running tests Problem: Quite a few beeps when running tests. Solution: Set 'belloff' for these tests. (Christian Brabandt)
author Christian Brabandt <cb@256bit.org>
date Wed, 08 Mar 2017 23:00:06 +0100
parents b85fcd9b858d
children 87779062d706
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
11091
ae45d497868f patch 8.0.0433: beeps when running tests
Christian Brabandt <cb@256bit.org>
parents: 6755
diff changeset
5 :set belloff=all
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 :" We also need the +syntax feature here.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 :if !has("syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 e! test.ok
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 w! test.out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 :" 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
13 /^1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 zf2j:call append("$", "manual " . getline(foldclosed(".")))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 zo:call append("$", foldclosed("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 ]z:call append("$", getline("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 zc:call append("$", getline(foldclosed(".")))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 :" test folding with markers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 :set fdm=marker fdl=1 fdc=3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 /^5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 :call append("$", "marker " . foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 [z:call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 jo{{ r{jj:call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 kYpj:call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 :" test folding with indent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 :set fdm=indent sw=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 /^2 b
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 i jI :call append("$", "indent " . foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 k:call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 :" test syntax folding
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 :set fdm=syntax fdl=0
1977
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
32 :syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
33 :syn region Fd1 start="ee" end="ff" fold contained
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
34 :syn region Fd2 start="gg" end="hh" fold contained
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
35 :syn region Fd3 start="commentstart" end="commentend" fold contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 Gzk:call append("$", "folding " . getline("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 k:call append("$", getline("."))
1977
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
38 jAcommentstart Acommentend:set fdl=1
f018c759e4ed updated for version 7.2-274
vimboss
parents: 1405
diff changeset
39 3j:call append("$", getline("."))
2086
c11845a465ae updated for version 7.2.370
Bram Moolenaar <bram@zimbu.org>
parents: 1977
diff changeset
40 :set fdl=0
c11845a465ae updated for version 7.2.370
Bram Moolenaar <bram@zimbu.org>
parents: 1977
diff changeset
41 zO j:call append("$", getline("."))
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 :" test expression folding
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 :fun Flvl()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 let l = getline(v:lnum)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 if l =~ "bb$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 return 2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 elseif l =~ "gg$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 return "s1"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 elseif l =~ "ii$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 return ">2"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 elseif l =~ "kk$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 return "0"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 return "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 endfun
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 :set fdm=expr fde=Flvl()
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 /bb$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 :call append("$", "expr " . foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 /hh$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 :call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 /ii$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 :call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 /kk$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 :call append("$", foldlevel("."))
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 :/^last/+1,$w! test.out
1405
b63792dadc23 updated for version 7.1-120
vimboss
parents: 7
diff changeset
66 :delfun Flvl
6755
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
67 :new
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
68 iTest fdm=indent and :move bug END
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
69 line2
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
70 Test fdm=indent START
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
71 line3
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
72 line4
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
73 :set fdm=indent
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
74 :1m1
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
75 2jzc:m0
b85fcd9b858d patch 7.4.700
Bram Moolenaar <bram@vim.org>
parents: 2086
diff changeset
76 :%w >> test.out
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 :qa!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 ENDTEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 1 aa
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 2 bb
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 3 cc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 4 dd {{{
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 5 ee {{{ }}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 6 ff }}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 7 gg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 8 hh
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 9 ii
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 a jj
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 b kk
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 last