annotate src/testdir/test76.in @ 8030:05f57db9d8da

Added tag v7.4.1309 for changeset 770dd91ad9f7d0b2eda796b5b720e192c1ced83e
author Christian Brabandt <cb@256bit.org>
date Sat, 13 Feb 2016 14:15:04 +0100
parents 1c4ec9ed71ca
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2635
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Tests for completefunc/omnifunc. vim: set ft=vim :
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :"Test that nothing happens if the 'completefunc' opens
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
5 :"a new window (no completion, no crash)
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :so small.vim
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :function! DummyCompleteOne(findstart, base)
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 : if a:findstart
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 : return 0
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 : else
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 : wincmd n
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12 : return ['onedef', 'oneDEF']
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 : endif
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 :endfunction
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 :setlocal completefunc=DummyCompleteOne
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 /^one
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 A:q!
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 :function! DummyCompleteTwo(findstart, base)
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 : if a:findstart
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 : wincmd n
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 : return 0
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 : else
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 : return ['twodef', 'twoDEF']
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 : endif
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 :endfunction
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 :setlocal completefunc=DummyCompleteTwo
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 /^two
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 A:q!
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :"Test that 'completefunc' works when it's OK.
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :function! DummyCompleteThree(findstart, base)
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
31 : if a:findstart
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 : return 0
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 : else
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 : return ['threedef', 'threeDEF']
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 : endif
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :endfunction
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 :setlocal completefunc=DummyCompleteThree
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 /^three
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 A:/^+++/,/^three/w! test.out
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 :qa!
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 ENDTEST
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 +++
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 one
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45 two
1c4ec9ed71ca updated for version 7.3.056
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
46 three