aboutsummaryrefslogtreecommitdiffstats
path: root/t/107-drop-works-with-more-than-ten-saved-branches.t
blob: 374f49be297a8c3c3998302d33070b93a9dfc74d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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;