ruanyl / vim-gh-line

vim plugin that open the link of current line on github
MIT License
408 stars 37 forks source link

Add automated tests #18

Closed ahakanbaba closed 5 years ago

ahakanbaba commented 5 years ago

The supported use-cases by this plugin are increasing very fast so that manually verifying all of them becomes impossible. Automated tests would be great and help with the development significantly.

Some of the different dimensions to test:

I ran into some other vim plugins that execute automated tests.

Something similar can be explored here too.

ahakanbaba commented 5 years ago

@KostyaEsmukov, you mentioned a need to automated tests in your comment. I created this issue for that. FYI.

KostyaEsmukov commented 5 years ago

@ahakanbaba Thanks!

Given that this project relies on sed, which is not quite portable getween GNU and BSD, I think it would be great to run the automated tests in both Linux and BSD. Unfortunately, I'm not aware of any service like Travis CI which provide support for running jobs on BSD.

Another option is to replace sed with something more portable so it could be enough to run tests just on Linux.

ahakanbaba commented 5 years ago

Both CircleCI and Travis support running on OSX. I think the default sed in OSX is not the GNU sed.

KostyaEsmukov commented 5 years ago

Oh, I didn't think of OSX. Yeah, that should do it: sed in macOS is indeed the BSD's one.

ahakanbaba commented 5 years ago

While working on Cgit support (#15) I really felt the need to write unit-tests. The different use-cases really explode in number. However testing the script-local functions in plugin/vim-gh-line.vim are not straight forward. Asked a question about it here. If anyone have suggestions I would appreciate.

ahakanbaba commented 5 years ago

@ruanyl This issue can also be closed. We have automated tests running in PR time.