mirror of
https://github.com/vim/vim.git
synced 2025-10-27 09:24:23 -04:00
patch 9.1.1754: :helptags doesn't skip examples with syntax
Problem: :helptags doesn't skip examples with syntax
(Evgeni Chasnovski)
Solution: Check for examples with syntax (zeertzjq).
fixes: #18273
closes: #18277
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f35a2af8ef
commit
6f020cde56
@@ -139,11 +139,17 @@ func Test_helptag_cmd()
|
||||
call delete('Xtagdir/tags')
|
||||
|
||||
" Test parsing tags
|
||||
call writefile(['*tag1*', 'Example: >', ' *notag*', 'Example end: *tag2*'],
|
||||
call writefile(['*tag1*', 'Example: >', ' *notag1*', 'Example end: *tag2*',
|
||||
\ '>', ' *notag2*', '<',
|
||||
\ '*tag3*', 'Code: >vim', ' *notag3*', 'Code end: *tag4*',
|
||||
\ '>i3config', ' *notag4*', '<'],
|
||||
\ 'Xtagdir/a/doc/sample.txt')
|
||||
helptags Xtagdir
|
||||
call assert_equal(["tag1\ta/doc/sample.txt\t/*tag1*",
|
||||
\ "tag2\ta/doc/sample.txt\t/*tag2*"], readfile('Xtagdir/tags'))
|
||||
\ "tag2\ta/doc/sample.txt\t/*tag2*",
|
||||
\ "tag3\ta/doc/sample.txt\t/*tag3*",
|
||||
\ "tag4\ta/doc/sample.txt\t/*tag4*"],
|
||||
\ readfile('Xtagdir/tags'))
|
||||
|
||||
" Duplicate tags in the help file
|
||||
call writefile(['*tag1*', '*tag1*', '*tag2*'], 'Xtagdir/a/doc/sample.txt')
|
||||
|
||||
Reference in New Issue
Block a user