Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new test delete and fix delete action #38

Merged
merged 1 commit into from Sep 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
/vader.vim/
/tests/repo/
/doc/tags
2 changes: 1 addition & 1 deletion plugin/fzf_checkout.vim
Expand Up @@ -74,7 +74,7 @@ let s:tag_actions = {
\ },
\ 'delete': {
\ 'prompt': 'Delete> ',
\ 'execute': 'echo system("{git} branch -D {tag}")',
\ 'execute': 'echo system("{git} tag -d {tag}")',
\ 'multiple': v:true,
\ 'keymap': 'ctrl-d',
\ 'required': ['tag'],
Expand Down
3 changes: 3 additions & 0 deletions tests/init.vim
Expand Up @@ -6,3 +6,6 @@ let g:fzf_branch_actions = {
\ 'delete': {'confirm': v:false},
\ 'merge': {'confirm': v:false},
\}
let g:fzf_tag_actions = {
\ 'delete': {'confirm': v:false},
\}
10 changes: 10 additions & 0 deletions tests/tests.vader
Expand Up @@ -133,6 +133,16 @@ Execute (Create action over new_tag):
Then (now there are three tags):
AssertEqual 3, len(split(system('git tag'), '\n'))

Execute (Delete action over new_tag):
AssertEqual 3, len(split(system('git tag'), '\n'))
call fzf_checkout#execute(
\ 'tag',
\ '',
\ ['', 'ctrl-d', 'new_tag Add the other badge 19 hours ago -> 8ed668b'],
\)
Then (now there are two tags):
AssertEqual 2, len(split(system('git tag'), '\n'))

Execute (Teardown):
cd ../../
call system('rm -rf tests/repo/')