diff options
author | Teddy Wing | 2019-12-09 21:35:33 +0100 |
---|---|---|
committer | Teddy Wing | 2019-12-09 21:35:33 +0100 |
commit | ad5255d97b69b6f8434920fbc31747dac4a81060 (patch) | |
tree | 9876d5ec0811bacf50ca6b2522fca56ea6311ec3 /t/107-drop-works-with-more-than-ten-saved-branches.t | |
parent | 41ad11d720ac4ffab406e36c504517d355160011 (diff) | |
parent | f0993eb7d45a414030b15091fe47a08110f71e7f (diff) | |
download | git-branch-list-ad5255d97b69b6f8434920fbc31747dac4a81060.tar.bz2 |
Merge branch 'fix-operations-when-there-are-more-than-ten-saved-branches'
Diffstat (limited to 't/107-drop-works-with-more-than-ten-saved-branches.t')
-rw-r--r-- | t/107-drop-works-with-more-than-ten-saved-branches.t | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/t/107-drop-works-with-more-than-ten-saved-branches.t b/t/107-drop-works-with-more-than-ten-saved-branches.t new file mode 100644 index 0000000..374f49b --- /dev/null +++ b/t/107-drop-works-with-more-than-ten-saved-branches.t @@ -0,0 +1,100 @@ +#!/usr/bin/env perl -w + +use strict; + +use Test::More; + +use Bin qw($BIN); + +chdir 't-git-repo' or die $!; + +system('git branch one'); +ok !$?; + +system("$BIN save one"); +ok !$?; + +system('git branch two'); +ok !$?; + +system("$BIN save two"); +ok !$?; + +system('git branch three'); +ok !$?; + +system("$BIN save three"); +ok !$?; + +system('git branch four'); +ok !$?; + +system("$BIN save four"); +ok !$?; + +system('git branch five'); +ok !$?; + +system("$BIN save five"); +ok !$?; + +system('git branch six'); +ok !$?; + +system("$BIN save six"); +ok !$?; + +system('git branch seven'); +ok !$?; + +system("$BIN save seven"); +ok !$?; + +system('git branch eight'); +ok !$?; + +system("$BIN save eight"); +ok !$?; + +system('git branch nine'); +ok !$?; + +system("$BIN save nine"); +ok !$?; + +system('git branch ten'); +ok !$?; + +system("$BIN save ten"); +ok !$?; + +system('git branch eleven'); +ok !$?; + +system("$BIN save eleven"); +ok !$?; + + +system("$BIN drop 1"); +ok !$?; + +my $branch_list = qx($BIN); +is $branch_list, ' 1 ten + 2 nine + 3 eight + 4 seven + 5 six + 6 five + 7 four + 8 three + 9 two + 10 one +'; + + +# Teardown +system("$BIN clear"); +system('git branch -d one two three four five six seven eight nine ten eleven'); + + +done_testing; |