Mercurial > vim
annotate src/testdir/test_preview.vim @ 20687:770a8e9c4781 v8.2.0897
patch 8.2.0897: list of functions in patched version is outdated
Commit: https://github.com/vim/vim/commit/ebacddbc16b2d76bf5dad636d7ee5c529f0e8753
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 4 15:22:21 2020 +0200
patch 8.2.0897: list of functions in patched version is outdated
Problem: List of functions in patched version is outdated.
Solution: Update the function lists only.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 04 Jun 2020 15:30:05 +0200 |
parents | 2c4d9ca33769 |
children | 0ab45b558621 |
rev | line source |
---|---|
11759
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for the preview window |
18767
068337e86133
patch 8.1.2373: cannot build with +popupwin but without +quickfix
Bram Moolenaar <Bram@vim.org>
parents:
11759
diff
changeset
|
2 source check.vim |
068337e86133
patch 8.1.2373: cannot build with +popupwin but without +quickfix
Bram Moolenaar <Bram@vim.org>
parents:
11759
diff
changeset
|
3 CheckFeature quickfix |
11759
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 func Test_Psearch() |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 " this used to cause ml_get errors |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 help |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 let wincount = winnr('$') |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 0f |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 ps. |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 call assert_equal(wincount + 1, winnr('$')) |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 pclose |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 call assert_equal(wincount, winnr('$')) |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 bwipe |
5e36b2f825cb
patch 8.0.0762: ml_get error with :psearch in buffer without a name
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 endfunc |
19932
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
16 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
17 func Test_window_preview() |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
18 CheckFeature quickfix |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
19 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
20 " Open a preview window |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
21 pedit Xa |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
22 call assert_equal(2, winnr('$')) |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
23 call assert_equal(0, &previewwindow) |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
24 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
25 " Go to the preview window |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
26 wincmd P |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
27 call assert_equal(1, &previewwindow) |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
28 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
29 " Close preview window |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
30 wincmd z |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
31 call assert_equal(1, winnr('$')) |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
32 call assert_equal(0, &previewwindow) |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
33 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
34 call assert_fails('wincmd P', 'E441:') |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
35 endfunc |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
36 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
37 func Test_window_preview_from_help() |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
38 CheckFeature quickfix |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
39 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
40 filetype on |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
41 call writefile(['/* some C code */'], 'Xpreview.c') |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
42 help |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
43 pedit Xpreview.c |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
44 wincmd P |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
45 call assert_equal(1, &previewwindow) |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
46 call assert_equal('c', &filetype) |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
47 wincmd z |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
48 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
49 filetype off |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
50 close |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
51 call delete('Xpreview.c') |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
52 endfunc |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
53 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
54 func Test_multiple_preview_windows() |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
55 new |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
56 set previewwindow |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
57 new |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
58 call assert_fails('set previewwindow', 'E590:') |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
59 %bw! |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
60 endfunc |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
61 |
2c4d9ca33769
patch 8.2.0522: several errors are not tested for
Bram Moolenaar <Bram@vim.org>
parents:
18767
diff
changeset
|
62 " vim: shiftwidth=2 sts=2 expandtab |