Skip to content

Commit fdc0f18

Browse files
committed
Add tests for :GBrowse in .git/refs
Add tests for .git/refs/heads and .git/refs/tags. Others in .git/refs are not tested for now.
1 parent b3e91a3 commit fdc0f18

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/gbrowse.vader

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,24 @@ Execute (GBrowse - commit type):
6060
let url = g:fugitive_browse_handlers[0](opts)
6161
AssertEqual 'https://git.example.com/fugitive-cgit.vim.git/commit/?id=a935a734765575b33da6c50fe8d0175e70e0e542', url
6262

63+
Execute (GBrowse - branch refs):
64+
let opts = {
65+
\'remote': 'git@git.example.com:fugitive-cgit.vim.git',
66+
\'path': '.git/refs/heads/master',
67+
\}
68+
let g:fugitive_cgit_domains = ['https://git.example.com']
69+
let url = g:fugitive_browse_handlers[0](opts)
70+
AssertEqual 'https://git.example.com/fugitive-cgit.vim.git/log/?h=master', url
71+
72+
Execute (GBrowse - tag refs):
73+
let opts = {
74+
\'remote': 'git@git.example.com:fugitive-cgit.vim.git',
75+
\'path': '.git/refs/tags/0.1.2',
76+
\}
77+
let g:fugitive_cgit_domains = ['https://git.example.com']
78+
let url = g:fugitive_browse_handlers[0](opts)
79+
AssertEqual 'https://git.example.com/fugitive-cgit.vim.git/tag/?h=0.1.2', url
80+
6381
Execute (GBrowse - ssh remote):
6482
let opts = {
6583
\'remote': 'git@git.example.com:fugitive-cgit.vim.git',

0 commit comments

Comments
 (0)