diff options
Diffstat (limited to 't/103-drop-does-not-drop-other-branches-with-similar-names.t')
-rw-r--r-- | t/103-drop-does-not-drop-other-branches-with-similar-names.t | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/t/103-drop-does-not-drop-other-branches-with-similar-names.t b/t/103-drop-does-not-drop-other-branches-with-similar-names.t new file mode 100644 index 0000000..05360cb --- /dev/null +++ b/t/103-drop-does-not-drop-other-branches-with-similar-names.t @@ -0,0 +1,37 @@ +#!/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-similar-name'); +ok !$?; + +system("$BIN save"); +ok !$?; + +system('git checkout -b first'); +ok !$?; + +system("$BIN save"); +ok !$?; + +system("$BIN drop"); +ok !$?; + +my $branch_list = qx($BIN); +is $branch_list, ' 1 first-similar-name +'; + + +# Teardown +system('git checkout master'); +system('git branch -d first first-similar-name'); +system("$BIN clear"); + + +done_testing; |