diff src/testdir/test_packadd.vim @ 8522:721e8d6cb7b5 v7.4.1551

commit https://github.com/vim/vim/commit/6bef5306e4f2cacb3a93667992c2312d4b293c9d Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 12 21:28:26 2016 +0100 patch 7.4.1551 Problem: Cannot generate help tags in all doc directories. Solution: Make ":helptags ALL" work.
author Christian Brabandt <cb@256bit.org>
date Sat, 12 Mar 2016 21:30:04 +0100
parents b4350a4d1e01
children 2f57bbe870ea
line wrap: on
line diff
--- a/src/testdir/test_packadd.vim
+++ b/src/testdir/test_packadd.vim
@@ -97,3 +97,20 @@ func Test_packloadall()
   packloadall!
   call assert_equal(4321, g:plugin_bar_number)
 endfunc
+
+func Test_helptags()
+  let docdir1 = &packpath . '/pack/mine/start/foo/doc'
+  let docdir2 = &packpath . '/pack/mine/start/bar/doc'
+  call mkdir(docdir1, 'p')
+  call mkdir(docdir2, 'p')
+  call writefile(['look here: *look-here*'], docdir1 . '/bar.txt')
+  call writefile(['look away: *look-away*'], docdir2 . '/foo.txt')
+  exe 'set rtp=' . &packpath . '/pack/mine/start/foo,' . &packpath . '/pack/mine/start/bar'
+
+  helptags ALL
+
+  let tags1 = readfile(docdir1 . '/tags') 
+  call assert_true(tags1[0] =~ 'look-here')
+  let tags2 = readfile(docdir2 . '/tags') 
+  call assert_true(tags2[0] =~ 'look-away')
+endfunc