File: 99-cleanup.t

package info (click to toggle)
libgit-raw-perl 0.90%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,540 kB
  • sloc: perl: 5,432; ansic: 182; makefile: 6
file content (33 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (2)
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
#!perl

use Test::More;

use File::Spec::Functions qw(catfile rel2abs);
use File::Path qw(rmtree);
use Git::Raw;

my @repos = (qw(test_repo rebase_repo test_repo_submodules));
foreach my $repo (@repos) {
	my $path = rel2abs(catfile('t', $repo));

	rmtree $path;
	ok ! -e $path;
}

my $odb_path = rel2abs(catfile('t', 'odb'));
rmtree $odb_path;
ok ! -e $odb_path;

my $fileName = rel2abs(catfile('t', 'initBranch'));
if (-e $fileName) {
	open my $fh, '<', $fileName or
		die "could not open '$fileName': $!";
	my $default = <$fh>;
	close $fh;

	my $config = Git::Raw::Config -> default();
	$config -> str('init.defaultBranch', $default);
	unlink $fileName;
}

done_testing;