Skip to content

Commit

Permalink
Add tests for :GBrowse in .git/refs
Browse files Browse the repository at this point in the history
Add tests for .git/refs/heads and .git/refs/tags. Others in .git/refs
are not tested for now.
  • Loading branch information
sudotac committed Jul 13, 2024
1 parent b3e91a3 commit fdc0f18
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/gbrowse.vader
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,24 @@ Execute (GBrowse - commit type):
let url = g:fugitive_browse_handlers[0](opts)
AssertEqual 'https://git.example.com/fugitive-cgit.vim.git/commit/?id=a935a734765575b33da6c50fe8d0175e70e0e542', url

Execute (GBrowse - branch refs):
let opts = {
\'remote': '[email protected]:fugitive-cgit.vim.git',
\'path': '.git/refs/heads/master',
\}
let g:fugitive_cgit_domains = ['https://git.example.com']
let url = g:fugitive_browse_handlers[0](opts)
AssertEqual 'https://git.example.com/fugitive-cgit.vim.git/log/?h=master', url

Execute (GBrowse - tag refs):
let opts = {
\'remote': '[email protected]:fugitive-cgit.vim.git',
\'path': '.git/refs/tags/0.1.2',
\}
let g:fugitive_cgit_domains = ['https://git.example.com']
let url = g:fugitive_browse_handlers[0](opts)
AssertEqual 'https://git.example.com/fugitive-cgit.vim.git/tag/?h=0.1.2', url

Execute (GBrowse - ssh remote):
let opts = {
\'remote': '[email protected]:fugitive-cgit.vim.git',
Expand Down

0 comments on commit fdc0f18

Please sign in to comment.