aboutsummaryrefslogtreecommitdiffstats
path: root/t/100-clear-clears-all-branches-from-list.t
blob: 952d68ac6c9176db033ba259a4a7aa01d5eb39a4 (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
#!/usr/bin/env perl -w

use strict;

use Test::More;

use File::Spec;

my $BIN = File::Spec->rel2abs('git-branch-list');

chdir 't-git-repo' or die $!;

system('git branch first');
ok !$?;

system("$BIN save first");
ok !$?;

system('git branch second');
ok !$?;

system("$BIN save second");
ok !$?;

system("$BIN clear");
ok !$?;

my $branch_list = qx($BIN);
is $branch_list, '';


# Teardown
system('git branch -d first second');


done_testing;