[SCM] vim-addon-manager packaging branch, master, updated. v0.4.4-57-gc3d8a72
Antonio Terceiro
terceiro at debian.org
Wed Feb 1 01:12:29 UTC 2012
The following commit has been merged in the master branch:
commit 12351b198a6ca6b0b2160a3a8f23da53310a30c6
Author: Antonio Terceiro <terceiro at debian.org>
Date: Tue Jan 31 23:05:24 2012 -0200
Testing documentation indexing
diff --git a/features/install.feature b/features/install.feature
index c8e3d12..0fc372d 100644
--- a/features/install.feature
+++ b/features/install.feature
@@ -11,3 +11,7 @@ Feature: installing addons
Scenario: installing newstyle
When I run `vim-addons install newstyle`
Then newstyle should be installed
+
+ Scenario: addon with documentation
+ When I run `vim-addons install withdoc`
+ Then the documentation should be indexed
diff --git a/features/step_definitions/steps.rb b/features/step_definitions/steps.rb
index c022470..008daf6 100644
--- a/features/step_definitions/steps.rb
+++ b/features/step_definitions/steps.rb
@@ -66,3 +66,7 @@ end
Then /^vim-addons should warn "([^"]*)"$/ do |text|
@stderr.should =~ Regexp.new(text)
end
+
+Then /^the documentation should be indexed$/ do
+ Dir.glob(File.join($tmpdir, 'doc', 'tags')).should_not be_empty
+end
diff --git a/lib/vim/addon_manager/addon/directory.rb b/lib/vim/addon_manager/addon/directory.rb
index 01c8801..baad87f 100644
--- a/lib/vim/addon_manager/addon/directory.rb
+++ b/lib/vim/addon_manager/addon/directory.rb
@@ -45,6 +45,8 @@ module Vim
def files
Dir.chdir(source) do
Dir.glob('**/*')
+ end.map do |filename|
+ File.join('vambundle', name, filename)
end
end
diff --git a/spec/data/registry/withdoc.yaml b/spec/data/registry/withdoc.yaml
new file mode 100644
index 0000000..ad182f0
--- /dev/null
+++ b/spec/data/registry/withdoc.yaml
@@ -0,0 +1,4 @@
+addon: withdoc
+description: "withdoc"
+files:
+ - doc/withdoc.txt
diff --git a/spec/data/scripts/doc/withdoc.txt b/spec/data/scripts/doc/withdoc.txt
new file mode 100644
index 0000000..ba7c511
--- /dev/null
+++ b/spec/data/scripts/doc/withdoc.txt
@@ -0,0 +1,9 @@
+*withdoc.txt* test addon
+
+ VIM REFERENCE MANUAL by Antonio Terceiro
+
+*withdoc* *withdoc.vim*
+
+This plugin is a test.
+
+{Vi does not have any of this - of course!}
diff --git a/spec/data/scripts/vambundle/newstyle/doc/newstyle.txt b/spec/data/scripts/vambundle/newstyle/doc/newstyle.txt
new file mode 100644
index 0000000..e384e3f
--- /dev/null
+++ b/spec/data/scripts/vambundle/newstyle/doc/newstyle.txt
@@ -0,0 +1,10 @@
+*newstyle.txt* test addon
+
+ VIM REFERENCE MANUAL by Antonio Terceiro
+
+*newstyle* *newstyle.vim*
+
+This plugin is a test.
+
+{Vi does not have any of this - of course!}
+
diff --git a/spec/vim/addon_manager/addon/directory_spec.rb b/spec/vim/addon_manager/addon/directory_spec.rb
index 91f42cf..854f8d3 100644
--- a/spec/vim/addon_manager/addon/directory_spec.rb
+++ b/spec/vim/addon_manager/addon/directory_spec.rb
@@ -9,8 +9,8 @@ describe Vim::AddonManager::Addon::Directory do
it 'lists files inside the directory' do
addon = addon('newstyle')
addon.stub(:basedir).and_return(File.join(FAKE_SCRIPTS))
- addon.files.should include('ftplugin/newstyle.vim')
- addon.files.should include('syntax/newstyle.vim')
+ addon.files.should include('vambundle/newstyle/ftplugin/newstyle.vim')
+ addon.files.should include('vambundle/newstyle/syntax/newstyle.vim')
end
it 'constructs source with basedir by default' do
--
vim-addon-manager packaging
More information about the pkg-vim-maintainers
mailing list