Win32 can have git binaries with extensions, and non-/ path separators
[catagits/Gitalist.git] / t / 02git_util.t
CommitLineData
5ed74c87 1use FindBin qw/$Bin/;
df629266 2BEGIN {
0556ab26 3 my $env = "$FindBin::Bin/../script/env";
df629266 4 if (-r $env) {
5 do $env or die $@;
6 }
7}
8
941bb5a1 9use strict;
10use warnings;
7a1d9791 11use Test::More;
941bb5a1 12
13use Data::Dumper;
14
7a1d9791 15BEGIN {
16 use_ok 'Gitalist::Git::Util';
44a9ed75 17 use_ok 'Gitalist::Git::Repository';
7a1d9791 18}
941bb5a1 19
20use Path::Class;
58251520 21my $gitdir = dir("$Bin/lib/repositories/repo1");
4baaeeef 22
44a9ed75 23my $proj = Gitalist::Git::Repository->new($gitdir);
7a1d9791 24my $util = Gitalist::Git::Util->new(
82bc0f05 25 repository => $proj,
7a1d9791 26);
27isa_ok($util, 'Gitalist::Git::Util');
941bb5a1 28
2d52ed84 29like( $util->_git, qr#\bgit(\.\w+)*$#, 'git binary found');
defb0050 30isa_ok($util->gpp, 'Git::PurePerl', 'gpp instance created');
941bb5a1 31
7a1d9791 32done_testing;