Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 Tests for folding. vim: set ft=vim : |
2 | |
3 STARTTEST | |
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 | 6 :" We also need the +syntax feature here. |
7 :if !has("syntax") | |
8 e! test.ok | |
9 w! test.out | |
10 qa! | |
11 :endif | |
12 :" basic test if a fold can be created, opened, moving to the end and closed | |
13 /^1 | |
14 zf2j:call append("$", "manual " . getline(foldclosed("."))) | |
15 zo:call append("$", foldclosed(".")) | |
16 ]z:call append("$", getline(".")) | |
17 zc:call append("$", getline(foldclosed("."))) | |
18 :" test folding with markers. | |
19 :set fdm=marker fdl=1 fdc=3 | |
20 /^5 | |
21 :call append("$", "marker " . foldlevel(".")) | |
22 [z:call append("$", foldlevel(".")) | |
23 jo{{ r{jj:call append("$", foldlevel(".")) | |
24 kYpj:call append("$", foldlevel(".")) | |
25 :" test folding with indent | |
26 :set fdm=indent sw=2 | |
27 /^2 b | |
28 i jI :call append("$", "indent " . foldlevel(".")) | |
29 k:call append("$", foldlevel(".")) | |
30 :" test syntax folding | |
31 :set fdm=syntax fdl=0 | |
1977 | 32 :syn region Hup start="dd" end="ii" fold contains=Fd1,Fd2,Fd3 |
33 :syn region Fd1 start="ee" end="ff" fold contained | |
34 :syn region Fd2 start="gg" end="hh" fold contained | |
35 :syn region Fd3 start="commentstart" end="commentend" fold contained | |
7 | 36 Gzk:call append("$", "folding " . getline(".")) |
37 k:call append("$", getline(".")) | |
1977 | 38 jAcommentstart Acommentend:set fdl=1 |
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 zOj:call append("$", getline(".")) |
7 | 42 :" test expression folding |
43 :fun Flvl() | |
44 let l = getline(v:lnum) | |
45 if l =~ "bb$" | |
46 return 2 | |
47 elseif l =~ "gg$" | |
48 return "s1" | |
49 elseif l =~ "ii$" | |
50 return ">2" | |
51 elseif l =~ "kk$" | |
52 return "0" | |
53 endif | |
54 return "=" | |
55 endfun | |
56 :set fdm=expr fde=Flvl() | |
57 /bb$ | |
58 :call append("$", "expr " . foldlevel(".")) | |
59 /hh$ | |
60 :call append("$", foldlevel(".")) | |
61 /ii$ | |
62 :call append("$", foldlevel(".")) | |
63 /kk$ | |
64 :call append("$", foldlevel(".")) | |
65 :/^last/+1,$w! test.out | |
1405 | 66 :delfun Flvl |
6755 | 67 :new |
68 iTest fdm=indent and :move bug END | |
69 line2 | |
70 Test fdm=indent START | |
71 line3 | |
72 line4 | |
73 :set fdm=indent | |
74 :1m1 | |
75 2jzc:m0 | |
76 :%w >> test.out | |
7 | 77 :qa! |
78 ENDTEST | |
79 | |
80 1 aa | |
81 2 bb | |
82 3 cc | |
83 4 dd {{{ | |
84 5 ee {{{ }}} | |
85 6 ff }}} | |
86 7 gg | |
87 8 hh | |
88 9 ii | |
89 a jj | |
90 b kk | |
91 last |