-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gists are either name/hex{32}, or just /hex{32}. If someone omits the project, and just specifies a name, then that is an error and should be treated as such. Also, eliminate some dead code paths and bring the tests up to 100%.
- Loading branch information
Showing
7 changed files
with
73 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
'use strict' | ||
module.exports = function (verify, domain, shortname) { | ||
verify('https://' + domain + '/111/222', 'https') | ||
verify('https://' + domain + '/111/222.git', 'https.git') | ||
verify('https://' + domain + '/111/222#branch', 'https#branch', 'branch') | ||
verify('https://' + domain + '/111/222.git#branch', 'https.git#branch', 'branch') | ||
module.exports = function (verify, domain, shortname, proj) { | ||
proj = proj || '222' | ||
verify('https://' + domain + '/111/' + proj, 'https') | ||
verify('https://' + domain + '/111/' + proj + '.git', 'https.git') | ||
verify('https://' + domain + '/111/' + proj + '#branch', 'https#branch', 'branch') | ||
verify('https://' + domain + '/111/' + proj + '.git#branch', 'https.git#branch', 'branch') | ||
|
||
verify('git+https://' + domain + '/111/222', 'git+https') | ||
verify('git+https://' + domain + '/111/222.git', 'git+https.git') | ||
verify('git+https://' + domain + '/111/222#branch', 'git+https#branch', 'branch') | ||
verify('git+https://' + domain + '/111/222.git#branch', 'git+https.git#branch', 'branch') | ||
verify('git+https://' + domain + '/111/' + proj, 'git+https') | ||
verify('git+https://' + domain + '/111/' + proj + '.git', 'git+https.git') | ||
verify('git+https://' + domain + '/111/' + proj + '#branch', 'git+https#branch', 'branch') | ||
verify('git+https://' + domain + '/111/' + proj + '.git#branch', 'git+https.git#branch', 'branch') | ||
|
||
verify('git@' + domain + ':111/222', 'ssh') | ||
verify('git@' + domain + ':111/222.git', 'ssh.git') | ||
verify('git@' + domain + ':111/222#branch', 'ssh', 'branch') | ||
verify('git@' + domain + ':111/222.git#branch', 'ssh.git', 'branch') | ||
verify('git@' + domain + ':111/' + proj, 'ssh') | ||
verify('git@' + domain + ':111/' + proj + '.git', 'ssh.git') | ||
verify('git@' + domain + ':111/' + proj + '#branch', 'ssh', 'branch') | ||
verify('git@' + domain + ':111/' + proj + '.git#branch', 'ssh.git', 'branch') | ||
|
||
verify('git+ssh://git@' + domain + '/111/222', 'ssh url') | ||
verify('git+ssh://git@' + domain + '/111/222.git', 'ssh url.git') | ||
verify('git+ssh://git@' + domain + '/111/222#branch', 'ssh url#branch', 'branch') | ||
verify('git+ssh://git@' + domain + '/111/222.git#branch', 'ssh url.git#branch', 'branch') | ||
verify('git+ssh://git@' + domain + '/111/' + proj, 'ssh url') | ||
verify('git+ssh://git@' + domain + '/111/' + proj + '.git', 'ssh url.git') | ||
verify('git+ssh://git@' + domain + '/111/' + proj + '#branch', 'ssh url#branch', 'branch') | ||
verify('git+ssh://git@' + domain + '/111/' + proj + '.git#branch', 'ssh url.git#branch', 'branch') | ||
|
||
verify(shortname + ':111/222', 'shortcut') | ||
verify(shortname + ':111/222.git', 'shortcut.git') | ||
verify(shortname + ':111/222#branch', 'shortcut#branch', 'branch') | ||
verify(shortname + ':111/222.git#branch', 'shortcut.git#branch', 'branch') | ||
verify(shortname + ':111/' + proj, 'shortcut') | ||
verify(shortname + ':111/' + proj + '.git', 'shortcut.git') | ||
verify(shortname + ':111/' + proj + '#branch', 'shortcut#branch', 'branch') | ||
verify(shortname + ':111/' + proj + '.git#branch', 'shortcut.git#branch', 'branch') | ||
} |