annotate src/testdir/test76.in @ 8157:74b44d06d3c7 v7.4.1372

commit https://github.com/vim/vim/commit/6f3a544228c1faf92211cbaf8bbedb1dff883f90 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 20 19:56:13 2016 +0100 patch 7.4.1372 Problem: channel read implementation is incomplete. Solution: Add ch_read() and options for ch_readraw().
author Christian Brabandt <cb@256bit.org>
date Sat, 20 Feb 2016 20:00:05 +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