Skip to content

Test(git-browse): unit tests #1125

@vanpipy

Description

@vanpipy

File

git-browse

git browse is that the command browses the files of the repository which comes from gitlab, github, bitbucket or other sites.

Testcases

  1. If the repository comes from gitlab, open a url like https://gitlab.com/<user_or_group>/<repo>/-/blob/<commit_or_branch>/<filename>#L<line1>-<line2>
  2. If the repository comes from github, open a url like https://github.com/<user_or_org>/<repo>/blob/<commit_or_branch>/<filename>#L<line1>-L<line2>
  3. If the repository comes from bitbucket, open a url like https://bitbucket.org/<user_or_org>/<repo>/src/<commit_or_branch>/<filename>#lines-<line1>:<line2>
  4. If the repository comes from other sites, open a url to the origin and cannot locate to something about line of one file
  5. If the OS is mac, open via command open
  6. If the OS is Git-Bash on windows, open via command start
  7. If the OS is WSL on windows, open via commnd start
  8. If the OS is linux, open via command xdg-open
  9. If the OS is unknown, open via command xdg-open

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions