Mercurial > vim
comparison src/testdir/test_help.vim @ 26927:e3f3108a780a v8.2.3992
patch 8.2.3992: wrong local-additions in the help with language mix
Commit: https://github.com/vim/vim/commit/0e2508d9e63e63414de2c06b3c8a446fdfe4470b
Author: h-east <h.east.727@gmail.com>
Date: Mon Jan 3 12:53:24 2022 +0000
patch 8.2.3992: wrong local-additions in the help with language mix
Problem: Wrong local-additions in the help with language mix.
Solution: Adjust how the local additions list is generated. (Hirohito
Higashi, closes #9464)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 03 Jan 2022 14:00:04 +0100 |
parents | 35d000f3d591 |
children | 8ed815f061af |
comparison
equal
deleted
inserted
replaced
26926:115ef4cd44b9 | 26927:e3f3108a780a |
---|---|
55 call mkdir('Xruntime/doc', 'p') | 55 call mkdir('Xruntime/doc', 'p') |
56 call writefile(['*mydoc.txt* my awesome doc'], 'Xruntime/doc/mydoc.txt') | 56 call writefile(['*mydoc.txt* my awesome doc'], 'Xruntime/doc/mydoc.txt') |
57 call writefile(['*mydoc-ext.txt* my extended awesome doc'], 'Xruntime/doc/mydoc-ext.txt') | 57 call writefile(['*mydoc-ext.txt* my extended awesome doc'], 'Xruntime/doc/mydoc-ext.txt') |
58 let rtp_save = &rtp | 58 let rtp_save = &rtp |
59 set rtp+=./Xruntime | 59 set rtp+=./Xruntime |
60 help | 60 help local-additions |
61 1 | 61 let lines = getline(line(".") + 1, search("^$") - 1) |
62 call search('mydoc.txt') | 62 call assert_equal([ |
63 call assert_equal('|mydoc.txt| my awesome doc', getline('.')) | 63 \ '|mydoc-ext.txt| my extended awesome doc', |
64 1 | 64 \ '|mydoc.txt| my awesome doc' |
65 call search('mydoc-ext.txt') | 65 \ ], lines) |
66 call assert_equal('|mydoc-ext.txt| my extended awesome doc', getline('.')) | 66 call delete('Xruntime/doc/mydoc-ext.txt') |
67 close | |
68 | |
69 call mkdir('Xruntime-ja/doc', 'p') | |
70 call writefile(["local-additions\thelp.jax\t/*local-additions*"], 'Xruntime-ja/doc/tags-ja') | |
71 call writefile(['*help.txt* This is jax file', '', | |
72 \ 'LOCAL ADDITIONS: *local-additions*', ''], 'Xruntime-ja/doc/help.jax') | |
73 call writefile(['*work.txt* This is jax file'], 'Xruntime-ja/doc/work.jax') | |
74 call writefile(['*work2.txt* This is jax file'], 'Xruntime-ja/doc/work2.jax') | |
75 set rtp+=./Xruntime-ja | |
76 | |
77 help local-additions@en | |
78 let lines = getline(line(".") + 1, search("^$") - 1) | |
79 call assert_equal([ | |
80 \ '|mydoc.txt| my awesome doc' | |
81 \ ], lines) | |
82 close | |
83 | |
84 help local-additions@ja | |
85 let lines = getline(line(".") + 1, search("^$") - 1) | |
86 call assert_equal([ | |
87 \ '|mydoc.txt| my awesome doc', | |
88 \ '|help.txt| This is jax file', | |
89 \ '|work.txt| This is jax file', | |
90 \ '|work2.txt| This is jax file', | |
91 \ ], lines) | |
67 close | 92 close |
68 | 93 |
69 call delete('Xruntime', 'rf') | 94 call delete('Xruntime', 'rf') |
95 call delete('Xruntime-ja', 'rf') | |
70 let &rtp = rtp_save | 96 let &rtp = rtp_save |
71 endfunc | 97 endfunc |
72 | 98 |
73 func Test_help_completion() | 99 func Test_help_completion() |
74 call feedkeys(":help :undo\<C-A>\<C-B>\"\<CR>", 'tx') | 100 call feedkeys(":help :undo\<C-A>\<C-B>\"\<CR>", 'tx') |