annotate src/testdir/test_help_tagjump.vim @ 27437:37dca3b3f63b

Added tag v8.2.4246 for changeset 4c683d6c0a9d5d8986e364885e4ea1362d34c4de
author Bram Moolenaar <Bram@vim.org>
date Fri, 28 Jan 2022 22:15:04 +0100
parents 431367075f29
children 98f5a0618a77
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
11167
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
9 help |
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
10 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
11 call assert_true(getline('.') =~ '\*bar\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
12 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
13
19277
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
14 help "
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
15 call assert_equal("help", &filetype)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
16 call assert_true(getline('.') =~ '\*quote\*')
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
17 helpclose
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
18
22574
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
19 help *
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
20 call assert_equal("help", &filetype)
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
21 call assert_true(getline('.') =~ '\*star\*')
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
22 helpclose
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
23
11167
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
24 help "*
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
25 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
26 call assert_true(getline('.') =~ '\*quotestar\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
27 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
28
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
29 help sm?le
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
30 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
31 call assert_true(getline('.') =~ '\*:smile\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
32 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
33
22574
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
34 help ??
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
35 call assert_equal("help", &filetype)
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
36 call assert_true(getline('.') =~ '\*??\*')
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
37 helpclose
431367075f29 patch 8.2.1835: ":help ??" finds the "!!" tag
Bram Moolenaar <Bram@vim.org>
parents: 19289
diff changeset
38
11167
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
39 help :?
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
40 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
41 call assert_true(getline('.') =~ '\*:?\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
42 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
43
14443
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
44 help q?
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
45 call assert_equal("help", &filetype)
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
46 call assert_true(getline('.') =~ '\*q?\*')
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
47 call assert_true(expand('<cword>') == 'q?')
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
48 helpclose
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
49
14435
90bed90d1130 patch 8.1.0231: :help -? goes to help for -+
Christian Brabandt <cb@256bit.org>
parents: 11167
diff changeset
50 help -?
90bed90d1130 patch 8.1.0231: :help -? goes to help for -+
Christian Brabandt <cb@256bit.org>
parents: 11167
diff changeset
51 call assert_equal("help", &filetype)
90bed90d1130 patch 8.1.0231: :help -? goes to help for -+
Christian Brabandt <cb@256bit.org>
parents: 11167
diff changeset
52 call assert_true(getline('.') =~ '\*-?\*')
90bed90d1130 patch 8.1.0231: :help -? goes to help for -+
Christian Brabandt <cb@256bit.org>
parents: 11167
diff changeset
53 helpclose
90bed90d1130 patch 8.1.0231: :help -? goes to help for -+
Christian Brabandt <cb@256bit.org>
parents: 11167
diff changeset
54
14443
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
55 help v_g?
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
56 call assert_equal("help", &filetype)
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
57 call assert_true(getline('.') =~ '\*v_g?\*')
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
58 helpclose
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
59
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
60 help expr-!=?
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
61 call assert_equal("help", &filetype)
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
62 call assert_true(getline('.') =~ '\*expr-!=?\*')
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
63 call assert_true(expand('<cword>') == 'expr-!=?')
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
64 helpclose
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
65
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
66 help expr-isnot?
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
67 call assert_equal("help", &filetype)
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
68 call assert_true(getline('.') =~ '\*expr-isnot?\*')
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
69 call assert_true(expand('<cword>') == 'expr-isnot?')
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
70 helpclose
e1c6aee62a72 patch 8.1.0235: more help tags that jump to the wrong location
Christian Brabandt <cb@256bit.org>
parents: 14435
diff changeset
71
11167
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
72 help FileW*Post
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
73 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
74 call assert_true(getline('.') =~ '\*FileWritePost\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
75 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
76
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
77 help `ls`
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
78 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
79 call assert_true(getline('.') =~ '\*:ls\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
80 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
81
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
82 help ^X
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
83 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
84 call assert_true(getline('.') =~ '\*CTRL-X\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
85 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
86
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
87 help i_^_CTRL-D
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
88 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
89 call assert_true(getline('.') =~ '\*i_^_CTRL-D\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
90 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
91
19277
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
92 help i^x^y
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
93 call assert_equal("help", &filetype)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
94 call assert_true(getline('.') =~ '\*i_CTRL-X_CTRL-Y\*')
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
95 helpclose
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
96
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
97 exe "help i\<C-\>\<C-G>"
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
98 call assert_equal("help", &filetype)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
99 call assert_true(getline('.') =~ '\*i_CTRL-\\_CTRL-G\*')
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
100 helpclose
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
101
11167
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
102 exec "help \<C-V>"
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
103 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
104 call assert_true(getline('.') =~ '\*CTRL-V\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
105 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
106
19277
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
107 help /\|
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
108 call assert_equal("help", &filetype)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
109 call assert_true(getline('.') =~ '\*/\\bar\*')
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
110 helpclose
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
111
19289
2f0f308c069c patch 8.2.0203: :helptags and some other functionality not tested
Bram Moolenaar <Bram@vim.org>
parents: 19277
diff changeset
112 help \_$
2f0f308c069c patch 8.2.0203: :helptags and some other functionality not tested
Bram Moolenaar <Bram@vim.org>
parents: 19277
diff changeset
113 call assert_equal("help", &filetype)
2f0f308c069c patch 8.2.0203: :helptags and some other functionality not tested
Bram Moolenaar <Bram@vim.org>
parents: 19277
diff changeset
114 call assert_true(getline('.') =~ '\*/\\_$\*')
2f0f308c069c patch 8.2.0203: :helptags and some other functionality not tested
Bram Moolenaar <Bram@vim.org>
parents: 19277
diff changeset
115 helpclose
2f0f308c069c patch 8.2.0203: :helptags and some other functionality not tested
Bram Moolenaar <Bram@vim.org>
parents: 19277
diff changeset
116
19277
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
117 help CTRL-\_CTRL-N
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
118 call assert_equal("help", &filetype)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
119 call assert_true(getline('.') =~ '\*CTRL-\\_CTRL-N\*')
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
120 helpclose
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
121
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
122 help `:pwd`,
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
123 call assert_equal("help", &filetype)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
124 call assert_true(getline('.') =~ '\*:pwd\*')
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
125 helpclose
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
126
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
127 help `:ls`.
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
128 call assert_equal("help", &filetype)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
129 call assert_true(getline('.') =~ '\*:ls\*')
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
130 helpclose
11167
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
131
8562
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
132 exec "help! ('textwidth'"
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
133 call assert_equal("help", &filetype)
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
134 call assert_true(getline('.') =~ "\\*'textwidth'\\*")
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
135 helpclose
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
136
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
137 exec "help! ('buflisted'),"
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
138 call assert_equal("help", &filetype)
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
139 call assert_true(getline('.') =~ "\\*'buflisted'\\*")
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
140 helpclose
8883
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
141
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
142 exec "help! abs({expr})"
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
143 call assert_equal("help", &filetype)
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
144 call assert_true(getline('.') =~ '\*abs()\*')
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
145 helpclose
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
146
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
147 exec "help! arglistid([{winnr}"
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
148 call assert_equal("help", &filetype)
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
149 call assert_true(getline('.') =~ '\*arglistid()\*')
b7de875169e6 commit https://github.com/vim/vim/commit/81edd171a9465cf99cede4fa4a7b7bca3d538b0f
Christian Brabandt <cb@256bit.org>
parents: 8562
diff changeset
150 helpclose
9234
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
151
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
152 exec "help! 'autoindent'."
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
153 call assert_equal("help", &filetype)
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
154 call assert_true(getline('.') =~ "\\*'autoindent'\\*")
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
155 helpclose
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
156
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
157 exec "help! {address}."
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
158 call assert_equal("help", &filetype)
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
159 call assert_true(getline('.') =~ '\*{address}\*')
6e80397a592c commit https://github.com/vim/vim/commit/28b942a064dd486cc241894b625ab72f5a5c6d1b
Christian Brabandt <cb@256bit.org>
parents: 9072
diff changeset
160 helpclose
11167
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
161
19277
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
162 " Use special patterns in the help tag
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
163 for h in ['/\w', '/\%^', '/\%(', '/\zs', '/\@<=', '/\_$', '[++opt]', '/\{']
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
164 exec "help! " . h
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
165 call assert_equal("help", &filetype)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
166 let pat = '\*' . escape(h, '\$[') . '\*'
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
167 call assert_true(getline('.') =~ pat, pat)
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
168 helpclose
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
169 endfor
1b02482e6a61 patch 8.2.0197: some Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14443
diff changeset
170
11167
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
171 exusage
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
172 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
173 call assert_true(getline('.') =~ '\*:index\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
174 helpclose
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
175
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
176 viusage
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
177 call assert_equal("help", &filetype)
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
178 call assert_true(getline('.') =~ '\*normal-index\*')
260100346566 patch 8.0.0470: not enough testing for help commands
Christian Brabandt <cb@256bit.org>
parents: 10444
diff changeset
179 helpclose
8562
40b982c98587 commit https://github.com/vim/vim/commit/8e15ffcde757ffc6cfe8b5e384948b3278e9af33
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
180 endfunc
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
181
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
182 let s:langs = ['en', 'ab', 'ja']
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
183
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
184 func s:doc_config_setup()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
185 let s:helpfile_save = &helpfile
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
186 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
187 let s:rtp_save = &rtp
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
188 let &rtp="Xdir1/doc-en"
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
189 if has('multi_lang')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
190 let s:helplang_save=&helplang
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
191 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
192
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
193 call delete('Xdir1', 'rf')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
194
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
195 for lang in s:langs
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
196 if lang ==# 'en'
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
197 let tagfname = 'tags'
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
198 let docfname = 'testdoc.txt'
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
199 else
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
200 let tagfname = 'tags-' . lang
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
201 let docfname = 'testdoc.' . lang . 'x'
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
202 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
203 let docdir = "Xdir1/doc-" . lang . "/doc"
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
204 call mkdir(docdir, "p")
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
205 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
206 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
207 \ "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
208 \ docdir . '/' . tagfname)
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
209 endfor
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
210 endfunc
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
211
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
212 func s:doc_config_teardown()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
213 call delete('Xdir1', 'rf')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
214
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
215 let &helpfile = s:helpfile_save
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
216 let &rtp = s:rtp_save
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
217 if has('multi_lang')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
218 let &helplang = s:helplang_save
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
219 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
220 endfunc
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
221
10394
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
222 func s:get_help_compl_list(cmd)
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
223 return getcompletion(a:cmd, 'help')
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
224 endfunc
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
225
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
226 func Test_help_complete()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
227 try
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
228 let list = []
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
229 call s:doc_config_setup()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
230
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
231 " '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
232 if has('multi_lang')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
233 set helplang=
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
234 endif
10394
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
235 let list = s:get_help_compl_list("test")
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
236 call assert_equal(['test-col', 'test-char'], list)
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
237
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
238 if has('multi_lang')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
239 " '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
240 set helplang=ab
10394
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
241 let list = s:get_help_compl_list("test")
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
242 call assert_equal(['test-col', 'test-char'], list)
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
243
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
244 " '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
245 set rtp+=Xdir1/doc-ab
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
246 set helplang=
10394
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
247 let list = s:get_help_compl_list("test")
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
248 call assert_equal(sort(['test-col@en', 'test-col@ab',
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
249 \ 'test-char@en', 'test-char@ab']), sort(list))
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
250
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
251 " '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
252 set helplang=ab
10394
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
253 let list = s:get_help_compl_list("test")
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
254 call assert_equal(sort(['test-col', 'test-col@en',
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
255 \ 'test-char', 'test-char@en']), sort(list))
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
256
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
257 " '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
258 set rtp+=Xdir1/doc-ja
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
259 set helplang=
10394
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
260 let list = s:get_help_compl_list("test")
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
261 call assert_equal(sort(['test-col@en', 'test-col@ab',
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
262 \ 'test-col@ja', 'test-char@en',
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
263 \ 'test-char@ab', 'test-char@ja']), sort(list))
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
264
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
265 " '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
266 set helplang=ab
10394
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
267 let list = s:get_help_compl_list("test")
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
268 call assert_equal(sort(['test-col', 'test-col@en',
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
269 \ 'test-col@ja', 'test-char',
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
270 \ 'test-char@en', 'test-char@ja']), sort(list))
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
271
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
272 " '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
273 set helplang=ab,ja
10394
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
274 let list = s:get_help_compl_list("test")
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
275 call assert_equal(sort(['test-col', 'test-col@ja',
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
276 \ 'test-col@en', 'test-char',
1de5916d9403 commit https://github.com/vim/vim/commit/9f0e423c2818c0cacd0810f9c3c67cbb6b80963d
Christian Brabandt <cb@256bit.org>
parents: 9909
diff changeset
277 \ 'test-char@ja', 'test-char@en']), sort(list))
9070
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
278 endif
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
279 catch
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
280 call assert_exception('X')
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
281 finally
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
282 call s:doc_config_teardown()
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
283 endtry
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
284 endfunc
0bb25b026fc9 commit https://github.com/vim/vim/commit/9ccaae04c6f263e6db14fc403bca2404a7871114
Christian Brabandt <cb@256bit.org>
parents: 8883
diff changeset
285
10444
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
286 func Test_help_respect_current_file_lang()
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
287 try
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
288 let list = []
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
289 call s:doc_config_setup()
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
290
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
291 if has('multi_lang')
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
292 function s:check_help_file_ext(help_keyword, ext)
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
293 exec 'help ' . a:help_keyword
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
294 call assert_equal(a:ext, expand('%:e'))
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
295 call feedkeys("\<C-]>", 'tx')
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
296 call assert_equal(a:ext, expand('%:e'))
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
297 pop
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
298 helpclose
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
299 endfunc
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
300
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
301 set rtp+=Xdir1/doc-ab
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
302 set rtp+=Xdir1/doc-ja
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
303
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
304 set helplang=ab
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
305 call s:check_help_file_ext('test-char', 'abx')
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
306 call s:check_help_file_ext('test-char@ja', 'jax')
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
307 set helplang=ab,ja
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
308 call s:check_help_file_ext('test-char@ja', 'jax')
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
309 call s:check_help_file_ext('test-char@en', 'txt')
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
310 endif
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
311 catch
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
312 call assert_exception('X')
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
313 finally
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
314 call s:doc_config_teardown()
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
315 endtry
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
316 endfunc
2edda415c28a commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Christian Brabandt <cb@256bit.org>
parents: 10394
diff changeset
317
9909
3ee84d270ea7 commit https://github.com/vim/vim/commit/9e4d8215d386100ab660d7d11e6620fd148b605e
Christian Brabandt <cb@256bit.org>
parents: 9234
diff changeset
318 " vim: shiftwidth=2 sts=2 expandtab