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