blob: b51c699fbe3a74d3f448f1ec5e3127eea7190a56 (
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 1");
ok !$?;
my $current_branch = qx(git rev-parse --abbrev-ref HEAD);
is $current_branch, 'eleven
';
system("$BIN 11");
ok !$?;
$current_branch = qx(git rev-parse --abbrev-ref HEAD);
is $current_branch, 'one
';
# Teardown
system('git checkout master');
system("$BIN clear");
system('git branch -d one two three four five six seven eight nine ten eleven');
done_testing;
|