/vest/test-parse.vim

https://github.com/ujihisa/neobundle.vim · Vim Script · 137 lines · 122 code · 10 blank · 5 comment · 0 complexity · 9745393bdbad0c9d0caf40a302a6e567 MD5 · raw file

  1. scriptencoding utf-8
  2. " Saving 'cpoptions' {{{
  3. let s:save_cpo = &cpo
  4. set cpo&vim
  5. " }}}
  6. Context types
  7. It parses github git repos
  8. Should neobundle#config#parse_path(
  9. \ 'Shougo/neocomplcache-clang.git') ==#
  10. \ {'type' : 'git', 'uri' :
  11. \ g:neobundle#types#git#default_protocol .
  12. \ '://github.com/Shougo/neocomplcache-clang.git',
  13. \ 'name' : 'neocomplcache-clang'}
  14. Should neobundle#config#parse_path('Shougo/vimshell') ==#
  15. \ {'type' : 'git', 'uri' :
  16. \ g:neobundle#types#git#default_protocol .
  17. \ '://github.com/Shougo/vimshell.git',
  18. \ 'name' : 'vimshell'}
  19. Should neobundle#config#parse_path('rails.vim') ==#
  20. \ {'type' : 'git', 'uri' :
  21. \ g:neobundle#types#git#default_protocol .
  22. \ '://github.com/vim-scripts/rails.vim.git',
  23. \ 'name' : 'rails.vim'}
  24. Should neobundle#config#parse_path(
  25. \ 'git://git.wincent.com/command-t.git') ==#
  26. \ {'type' : 'git', 'uri' :
  27. \ 'git://git.wincent.com/command-t.git',
  28. \ 'name' : 'command-t'}
  29. Should neobundle#config#parse_path('vim-scripts/ragtag.vim') ==#
  30. \ {'type' : 'git', 'uri' :
  31. \ g:neobundle#types#git#default_protocol .
  32. \ '://github.com/vim-scripts/ragtag.vim.git',
  33. \ 'name' : 'ragtag.vim'}
  34. Should neobundle#config#parse_path(
  35. \ 'https://github.com/vim-scripts/vim-game-of-life') ==#
  36. \ {'type' : 'git', 'uri' :
  37. \ 'https://github.com/vim-scripts/vim-game-of-life.git',
  38. \ 'name' : 'vim-game-of-life'}
  39. Should neobundle#config#parse_path(
  40. \ 'git@github.com:gmarik/ingretu.git') ==#
  41. \ {'type' : 'git', 'uri' :
  42. \ 'git@github.com:gmarik/ingretu.git',
  43. \ 'name' : 'ingretu'}
  44. Should neobundle#config#parse_path(
  45. \ 'gh:gmarik/snipmate.vim.git') ==#
  46. \ {'type' : 'git', 'uri' :
  47. \ g:neobundle#types#git#default_protocol .
  48. \ '://github.com/gmarik/snipmate.vim.git',
  49. \ 'name' : 'snipmate.vim'}
  50. Should neobundle#config#parse_path(
  51. \ 'github:mattn/gist-vim.git') ==#
  52. \ {'type' : 'git', 'uri' :
  53. \ g:neobundle#types#git#default_protocol .
  54. \ '://github.com/mattn/gist-vim.git',
  55. \ 'name' : 'gist-vim'}
  56. Should neobundle#config#parse_path(
  57. \ 'git@github.com:Shougo/neocomplcache.git') ==#
  58. \ {'type' : 'git', 'uri' :
  59. \ 'git@github.com:Shougo/neocomplcache.git',
  60. \ 'name' : 'neocomplcache'}
  61. End
  62. It parse svn repos
  63. Should neobundle#config#parse_path(
  64. \ 'http://svn.macports.org/repository/macports/contrib/mpvim/') ==#
  65. \ {'type' : 'svn', 'uri' :
  66. \ 'http://svn.macports.org/repository/macports/contrib/mpvim/',
  67. \ 'name' : 'mpvim'}
  68. End
  69. It parses bitbucket hg repos
  70. Should neobundle#config#parse_path(
  71. \ 'https://bitbucket.org/ns9tks/vim-fuzzyfinder') ==#
  72. \ {'type' : 'hg', 'uri' :
  73. \ 'https://bitbucket.org/ns9tks/vim-fuzzyfinder',
  74. \ 'name' : 'vim-fuzzyfinder'}
  75. Should neobundle#config#parse_path(
  76. \ 'bitbucket://bitbucket.org/ns9tks/vim-fuzzyfinder') ==#
  77. \ {'type' : 'hg', 'uri' :
  78. \ g:neobundle#types#hg#default_protocol.
  79. \ '://bitbucket.org/ns9tks/vim-fuzzyfinder',
  80. \ 'name' : 'vim-fuzzyfinder'}
  81. Should neobundle#config#parse_path(
  82. \ 'bitbucket:ns9tks/vim-fuzzyfinder') ==#
  83. \ {'type' : 'hg', 'uri' :
  84. \ g:neobundle#types#hg#default_protocol.
  85. \ '://bitbucket.org/ns9tks/vim-fuzzyfinder',
  86. \ 'name' : 'vim-fuzzyfinder'}
  87. Should neobundle#config#parse_path(
  88. \ 'ns9tks/vim-fuzzyfinder', {'site': 'bitbucket'}) ==#
  89. \ {'type' : 'hg', 'uri' :
  90. \ g:neobundle#types#hg#default_protocol.
  91. \ '://bitbucket.org/ns9tks/vim-fuzzyfinder',
  92. \ 'name' : 'vim-fuzzyfinder'}
  93. let bundle = neobundle#config#init_bundle(
  94. \ 'git://github.com/Shougo/neobundle.vim.git',
  95. \ [{ 'type' : 'hg'}])
  96. Should bundle.name ==# 'neobundle.vim'
  97. Should bundle.type ==# 'hg'
  98. Should bundle.uri ==# 'git://github.com/Shougo/neobundle.vim.git'
  99. End
  100. It parses bitbucket git repos
  101. Should neobundle#config#parse_path(
  102. \ 'https://bitbucket.org/kh3phr3n/vim-qt-syntax.git') ==#
  103. \ {'type' : 'git', 'uri' :
  104. \ 'https://bitbucket.org/kh3phr3n/vim-qt-syntax.git',
  105. \ 'name' : 'vim-qt-syntax'}
  106. Should neobundle#config#parse_path(
  107. \ 'bitbucket:kh3phr3n/vim-qt-syntax.git') ==#
  108. \ {'type' : 'git', 'uri' :
  109. \ g:neobundle#types#git#default_protocol.
  110. \ '://bitbucket.org/kh3phr3n/vim-qt-syntax.git',
  111. \ 'name' : 'vim-qt-syntax'}
  112. End
  113. It parses raw repos
  114. let bundle = neobundle#config#init_bundle(
  115. \ 'https://raw.github.com/m2ym/rsense/master/etc/rsense.vim',
  116. \ [{ 'script_type' : 'plugin'}])
  117. Should bundle.name ==# 'rsense.vim'
  118. Should bundle.type ==# 'raw'
  119. Should bundle.uri ==#
  120. \ 'https://raw.github.com/m2ym/rsense/master/etc/rsense.vim'
  121. End
  122. End
  123. Fin
  124. " Restore 'cpoptions' {{{
  125. let &cpo = s:save_cpo
  126. " }}}
  127. " vim:foldmethod=marker:fen: