diff options
author | Teddy Wing | 2018-03-21 17:17:26 +0100 |
---|---|---|
committer | Teddy Wing | 2018-03-21 17:17:26 +0100 |
commit | 565c054f57248409eddc7ebe20629b85093f7c55 (patch) | |
tree | 771be1bd34c924ffff4c688f4457e1d8d7e2b0bf /t/102-drop-drops-current-branch.t | |
parent | a33c35b0561162306169fae17452a5b521ece067 (diff) | |
download | git-branch-list-565c054f57248409eddc7ebe20629b85093f7c55.tar.bz2 |
Add `drop` command tests
Diffstat (limited to 't/102-drop-drops-current-branch.t')
-rw-r--r-- | t/102-drop-drops-current-branch.t | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/t/102-drop-drops-current-branch.t b/t/102-drop-drops-current-branch.t new file mode 100644 index 0000000..5534b6e --- /dev/null +++ b/t/102-drop-drops-current-branch.t @@ -0,0 +1,29 @@ +#!/usr/bin/env perl -w + +use strict; + +use Test::More; + +use Bin qw($BIN); + +chdir 't-git-repo' or die $!; + +system('git checkout -b first'); +ok !$?; + +system("$BIN save"); +ok !$?; + +system("$BIN drop"); +ok !$?; + +my $branch_list = qx($BIN); +is $branch_list, ''; + + +# Teardown +system('git checkout master'); +system('git branch -d first'); + + +done_testing; |