Alien-Win32-LZMA
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# If the script that is loading Module::Install is from the future,
# then make will detect this and cause it to re-run over and over
# again. This is bad. Rather than taking action to touch it (which
# is unreliable on some platforms and requires write permissions)
# for now we should catch this and refuse to run.
if ( -f $0 ) {
my $s = (stat($0))[9];
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
t/02_main.t view on Meta::CPAN
#####################################################################
# Test Compression and Decompression
ok(
Alien::Win32::LZMA::lzma_compress( $input => $small ),
'lzma_compress ok'
);
ok( -f $small, "lzma_compress created $small" );
ok(
(stat($input))[7] > (stat($small))[7],
'Compressed file is smaller',
);
ok(
Alien::Win32::LZMA::lzma_decompress( $small => $big ),
'lzma_decompress ok',
);
ok( -f $big, "lzma_decompress created $big" );
is(
(stat($input))[7],
(stat($big))[7],
'Decompressed file matches input file',
);
( run in 1.248 second using v1.01-cache-2.11-cpan-49f99fa48dc )