annotate src/testdir/test_help_tagjump.vim @ 10346:d52d97bf675e v8.0.0068

commit https://github.com/vim/vim/commit/21662be2211675824df1771c7f169948ede40c41 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 6 14:46:44 2016 +0100 patch 8.0.0068 Problem: Checking did_throw after executing autocommands is wrong. (Daniel Hahler) Solution: Call aborting() instead, and only when autocommands were executed.
author Christian Brabandt <cb@256bit.org>
date Sun, 06 Nov 2016 15:00:05 +0100
parents 3ee84d270ea7
children 1de5916d9403
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
9234
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
28
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
29 exec "help! 'autoindent'."
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
30 call assert_equal("help", &filetype)
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
31 call assert_true(getline('.') =~ "\\*'autoindent'\\*")
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
32 helpclose
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
33
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
34 exec "help! {address}."
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
35 call assert_equal("help", &filetype)
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
36 call assert_true(getline('.') =~ '\*{address}\*')
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
37 helpclose
8562
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 endfunc
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
39
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
40 let s:langs = ['en', 'ab', 'ja']
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
41
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
42 func s:doc_config_setup()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
43 let s:helpfile_save = &helpfile
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
44 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
45 let s:rtp_save = &rtp
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
46 let &rtp="Xdir1/doc-en"
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
47 if has('multi_lang')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
48 let s:helplang_save=&helplang
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
49 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
50
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
51 call delete('Xdir1', 'rf')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
52
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
53 for lang in s:langs
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
54 if lang ==# 'en'
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
55 let tagfname = 'tags'
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
56 let docfname = 'testdoc.txt'
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
57 else
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
58 let tagfname = 'tags-' . lang
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
59 let docfname = 'testdoc.' . lang . 'x'
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
60 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
61 let docdir = "Xdir1/doc-" . lang . "/doc"
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
62 call mkdir(docdir, "p")
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
63 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
64 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
65 \ "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
66 \ docdir . '/' . tagfname)
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
67 endfor
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:doc_config_teardown()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
71 call delete('Xdir1', 'rf')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
72
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
73 let &helpfile = s:helpfile_save
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
74 let &rtp = s:rtp_save
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
75 if has('multi_lang')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
76 let &helplang = s:helplang_save
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 endfunc
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
79
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
80 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
81 let list = []
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
82 let str = ''
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
83 for cnt in range(1, 999)
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
84 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
85 if str ==# a:cmd[1:]
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
86 break
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
87 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
88 call add(list, str)
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
89 endfor
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
90 return list
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
91 endfunc
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
92
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
93 func Test_help_complete()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
94 try
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
95 let list = []
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
96 call s:doc_config_setup()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
97
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
98 " '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
99 if has('multi_lang')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
100 set helplang=
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
101 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
102 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
103 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
104
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
105 if has('multi_lang')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
106 " '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
107 set helplang=ab
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
108 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
109 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
110
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
111 " '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
112 set rtp+=Xdir1/doc-ab
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
113 set helplang=
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
114 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
115 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
116 \ '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
117
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
118 " '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
119 set helplang=ab
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
120 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
121 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
122 \ '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
123
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
124 " '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
125 set rtp+=Xdir1/doc-ja
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
126 set helplang=
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
127 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
128 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
129 \ '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
130 \ '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
131
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
132 " '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
133 set helplang=ab
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
134 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
135 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
136 \ '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
137 \ '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
138
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
139 " '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
140 set helplang=ab,ja
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
141 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
142 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
143 \ '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
144 \ '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
145 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
146 catch
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
147 call assert_exception('X')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
148 finally
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
149 call s:doc_config_teardown()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
150 endtry
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
151 endfunc
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
152
9909
3ee84d270ea7 commit https://github.com/vim/vim/commit/9e4d8215d386100ab660d7d11e6620fd148b605e
Christian Brabandt <cb@256bit.org>
parents: 9234
diff changeset
153 " vim: shiftwidth=2 sts=2 expandtab