aboutsummaryrefslogtreecommitdiffstats
path: root/t/102-drop-drops-current-branch.t
diff options
context:
space:
mode:
authorTeddy Wing2018-03-21 17:17:26 +0100
committerTeddy Wing2018-03-21 17:17:26 +0100
commit565c054f57248409eddc7ebe20629b85093f7c55 (patch)
tree771be1bd34c924ffff4c688f4457e1d8d7e2b0bf /t/102-drop-drops-current-branch.t
parenta33c35b0561162306169fae17452a5b521ece067 (diff)
downloadgit-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.t29
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;