Git-FastExport
view release on metacpan or search on metacpan
t/10fast-export.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use Git::FastExport;
# this script tests the parsing of fast-export block data
my @latin = split m!^----\n!m, << 'EOT';
perferendis
sit
praesentium
doloribus
itaque
illum
facere
aliquip
----
harum
rerum
magnam
----
nam
laboriosam
tempora
ullam
odit
quidem
----
blanditiis
nulla
laboriosam
----
vitae
proident
sit
----
officiis
fuga
ipsum
----
beatae
dicta
debitis
----
vitae
repudiandae
laboriosam
EOT
my @blocks = (
{ type => 'blob',
header => 'blob',
data => join( '', @latin[ 0, 1, 2 ] ),
mark => ['mark :1'],
footer => "\012",
},
{ type => 'commit',
header => 'commit refs/heads/before',
data => "first commit\n",
mark => ['mark :2'],
author => [
'author Philippe Bruhat (BooK) <book@cpan.org> 1213115458 +0200'
],
committer => [
'committer Philippe Bruhat (BooK) <book@cpan.org> 1213115458 +0200'
],
files => ['M 0100644 :1 loremipsum.txt'],
committer_date => 1213115458,
( run in 1.330 second using v1.01-cache-2.11-cpan-71847e10f99 )