Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: VimLondon/vspec-demo
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 01_boilerplate
Choose a base ref
...
head repository: VimLondon/vspec-demo
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 02_generate_url
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 25, 2013

  1. Copy the full SHA
    07844a4 View commit details
  2. Copy the full SHA
    bbcde11 View commit details
Showing with 21 additions and 0 deletions.
  1. +7 −0 after/ftplugin/help/docopen.vim
  2. +14 −0 t/docopen-test.vim
7 changes: 7 additions & 0 deletions after/ftplugin/help/docopen.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function! RawUrl(filename, helptag)
if a:helptag == ''
return 'http://vimdoc.sourceforge.net/htmldoc/' . a:filename . '.html'
else
return 'http://vimdoc.sourceforge.net/htmldoc/' . a:filename . '.html#' . a:helptag
endif
endfunction
14 changes: 14 additions & 0 deletions t/docopen-test.vim
Original file line number Diff line number Diff line change
@@ -1 +1,15 @@
silent filetype plugin on

describe 'RawUrl'

it 'generates an URL from specified filename and helptag'
help
Expect RawUrl('foo', 'bar') == 'http://vimdoc.sourceforge.net/htmldoc/foo.html#bar'
end

it 'generates an URL from specified filename without helptag'
help
Expect RawUrl('foo', '') == 'http://vimdoc.sourceforge.net/htmldoc/foo.html'
end

end