Skip to content

Commit

Permalink
Fix svn type
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Nov 15, 2015
1 parent 5e83365 commit 3768a3b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autoload/neobundle/types/svn.vim
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ function! s:type.detect(path, opts) "{{{
let name = ''
let uri = ''

if a:path =~# '\<\%(file\|https\|svn\|svn+ssh\)://'
\ && a:path =~? '[/.]svn[/.]'
if (a:path =~# '\<\%(file\|https\)://'
\ && a:path =~? '[/.]svn[/.]')
\ || a:path =~# '\<svn+ssh://'
let uri = a:path
let type = 'svn'
elseif a:path =~# '\<\%(gh\|github\):\S\+\|https://github.com/'
Expand Down
8 changes: 8 additions & 0 deletions test/parse.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,19 @@ function! s:suite.svn_repos()
call s:assert.equals(neobundle#parser#path(
\ 'http://svn.macports.org/repository/macports/contrib/mpvim/'),
\ {})
call s:assert.equals(neobundle#parser#path(
\ 'svn://user@host/repos/bar'),
\ {})
call s:assert.equals(neobundle#parser#path(
\ 'https://svn.macports.org/repository/macports/contrib/mpvim/'),
\ {'type' : 'svn', 'uri' :
\ 'https://svn.macports.org/repository/macports/contrib/mpvim',
\ 'name' : 'mpvim'})
call s:assert.equals(neobundle#parser#path(
\ 'svn+ssh://user@host/repos/bar'),
\ {'type' : 'svn', 'uri' :
\ 'svn+ssh://user@host/repos/bar',
\ 'name' : 'bar'})
call s:assert.equals(neobundle#parser#path(
\ 'thinca/vim-localrc', {'type' : 'svn'}),
\ {'type' : 'svn', 'uri' :
Expand Down

0 comments on commit 3768a3b

Please sign in to comment.