Mercurial > vim
annotate src/testdir/test_help_tagjump.vim @ 9072:f60bdac6cc2c v7.4.1821
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat May 7 22:28:53 2016 +0200
patch 7.4.1821
Problem: Test fails on MS-Windows.
Solution: Sort the completion results.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 07 May 2016 22:30:05 +0200 |
parents | 0bb25b026fc9 |
children | 6e80397a592c |
rev | line source |
---|---|
8562
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Tests for :help! {subject} |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 func Test_help_tagjump() |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 help |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 call assert_equal("help", &filetype) |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 call assert_true(getline('.') =~ '\*help.txt\*') |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 helpclose |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 exec "help! ('textwidth'" |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 call assert_equal("help", &filetype) |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 call assert_true(getline('.') =~ "\\*'textwidth'\\*") |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 helpclose |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 exec "help! ('buflisted')," |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 call assert_equal("help", &filetype) |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 call assert_true(getline('.') =~ "\\*'buflisted'\\*") |
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 helpclose |
8883
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
18 |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
19 exec "help! abs({expr})" |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
20 call assert_equal("help", &filetype) |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
21 call assert_true(getline('.') =~ '\*abs()\*') |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
22 helpclose |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
23 |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
24 exec "help! arglistid([{winnr}" |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
25 call assert_equal("help", &filetype) |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
26 call assert_true(getline('.') =~ '\*arglistid()\*') |
b7de875169e6
commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents:
8562
diff
changeset
|
27 helpclose |
8562
40b982c98587
commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 endfunc |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
29 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
30 let s:langs = ['en', 'ab', 'ja'] |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
31 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
32 func s:doc_config_setup() |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
33 let s:helpfile_save = &helpfile |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
34 let &helpfile="Xdir1/doc-en/doc/testdoc.txt" |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
35 let s:rtp_save = &rtp |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
36 let &rtp="Xdir1/doc-en" |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
37 if has('multi_lang') |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
38 let s:helplang_save=&helplang |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
39 endif |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
40 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
41 call delete('Xdir1', 'rf') |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
42 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
43 for lang in s:langs |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
44 if lang ==# 'en' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
45 let tagfname = 'tags' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
46 let docfname = 'testdoc.txt' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
47 else |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
48 let tagfname = 'tags-' . lang |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
49 let docfname = 'testdoc.' . lang . 'x' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
50 endif |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
51 let docdir = "Xdir1/doc-" . lang . "/doc" |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
52 call mkdir(docdir, "p") |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
53 call writefile(["\t*test-char*", "\t*test-col*"], docdir . '/' . docfname) |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
54 call writefile(["test-char\t" . docfname . "\t/*test-char*", |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
55 \ "test-col\t" . docfname . "\t/*test-col*"], |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
56 \ docdir . '/' . tagfname) |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
57 endfor |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
58 endfunc |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
59 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
60 func s:doc_config_teardown() |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
61 call delete('Xdir1', 'rf') |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
62 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
63 let &helpfile = s:helpfile_save |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
64 let &rtp = s:rtp_save |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
65 if has('multi_lang') |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
66 let &helplang = s:helplang_save |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
67 endif |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
68 endfunc |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
69 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
70 func s:get_cmd_compl_list(cmd) |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
71 let list = [] |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
72 let str = '' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
73 for cnt in range(1, 999) |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
74 call feedkeys(a:cmd . repeat("\<Tab>", cnt) . "'\<C-B>let str='\<CR>", 'tx') |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
75 if str ==# a:cmd[1:] |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
76 break |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
77 endif |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
78 call add(list, str) |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
79 endfor |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
80 return list |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
81 endfunc |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
82 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
83 func Test_help_complete() |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
84 try |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
85 let list = [] |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
86 call s:doc_config_setup() |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
87 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
88 " 'helplang=' and help file lang is 'en' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
89 if has('multi_lang') |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
90 set helplang= |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
91 endif |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
92 let list = s:get_cmd_compl_list(":h test") |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
93 call assert_equal(['h test-col', 'h test-char'], list) |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
94 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
95 if has('multi_lang') |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
96 " 'helplang=ab' and help file lang is 'en' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
97 set helplang=ab |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
98 let list = s:get_cmd_compl_list(":h test") |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
99 call assert_equal(['h test-col', 'h test-char'], list) |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
100 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
101 " 'helplang=' and help file lang is 'en' and 'ab' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
102 set rtp+=Xdir1/doc-ab |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
103 set helplang= |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
104 let list = s:get_cmd_compl_list(":h test") |
9072
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
105 call assert_equal(sort(['h test-col@en', 'h test-col@ab', |
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
106 \ 'h test-char@en', 'h test-char@ab']), sort(list)) |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
107 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
108 " 'helplang=ab' and help file lang is 'en' and 'ab' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
109 set helplang=ab |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
110 let list = s:get_cmd_compl_list(":h test") |
9072
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
111 call assert_equal(sort(['h test-col', 'h test-col@en', |
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
112 \ 'h test-char', 'h test-char@en']), sort(list)) |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
113 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
114 " 'helplang=' and help file lang is 'en', 'ab' and 'ja' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
115 set rtp+=Xdir1/doc-ja |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
116 set helplang= |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
117 let list = s:get_cmd_compl_list(":h test") |
9072
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
118 call assert_equal(sort(['h test-col@en', 'h test-col@ab', |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
119 \ 'h test-col@ja', 'h test-char@en', |
9072
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
120 \ 'h test-char@ab', 'h test-char@ja']), sort(list)) |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
121 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
122 " 'helplang=ab' and help file lang is 'en', 'ab' and 'ja' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
123 set helplang=ab |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
124 let list = s:get_cmd_compl_list(":h test") |
9072
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
125 call assert_equal(sort(['h test-col', 'h test-col@en', |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
126 \ 'h test-col@ja', 'h test-char', |
9072
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
127 \ 'h test-char@en', 'h test-char@ja']), sort(list)) |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
128 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
129 " 'helplang=ab,ja' and help file lang is 'en', 'ab' and 'ja' |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
130 set helplang=ab,ja |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
131 let list = s:get_cmd_compl_list(":h test") |
9072
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
132 call assert_equal(sort(['h test-col', 'h test-col@ja', |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
133 \ 'h test-col@en', 'h test-char', |
9072
f60bdac6cc2c
commit https://github.com/vim/vim/commit/4ed6b2e2d7fd5959fb9b9f608935d47305c4bbe4
Christian Brabandt <cb@256bit.org>
parents:
9070
diff
changeset
|
134 \ 'h test-char@ja', 'h test-char@en']), sort(list)) |
9070
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
135 endif |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
136 catch |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
137 call assert_exception('X') |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
138 finally |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
139 call s:doc_config_teardown() |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
140 endtry |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
141 endfunc |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
142 |
0bb25b026fc9
commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents:
8883
diff
changeset
|
143 " vim: et sw=2: |