Skip to content
Snippets Groups Projects
Commit c2b21d66 authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- prepared reallife AM-bags for tests

parent cbf7e124
No related branches found
No related tags found
No related merge requests found
use v5.36; use v5.36;
use Test::Cmd; use Test::Cmd;
use Test::More tests =>3; use Test::More tests => 4;
use Test::TA; use Test::TA;
use Archive::Tar;
use Path::Tiny;
my $testapp = Test::TA::testapp(); my $testapp = Test::TA::testapp();
my $host = Test::TA::testhost(); my $path_valid = path($testapp->workpath)->child("valid");
my $path_invalid = path($testapp->workpath)->child("invalid");
$path_valid->mkdir();
$path_invalid->mkdir();
my $tar = Archive::Tar->new();
my $tarpath = path(__FILE__)->absolute->parent->child("/../testdata.tgz");
say $tarpath;
$tar->read($tarpath);
$tar->setcwd($path_valid);
$tar->extract();
$tar->setcwd($path_invalid);
$tar->extract();
$path_invalid->visit( # patch files to get invalid bags
sub {
my ($path, $state) = @_;
if ($path =~ m/bag-info.txt$/) {
$path->append_utf8("Payload-Oxum: 0.0");
}
1;
},
{recurse => 1 }
);
local $ENV{'HOME'} = $testapp->workpath(); local $ENV{'HOME'} = $testapp->workpath();
# tests # tests
subtest 'help check' => sub { subtest 'help check' => sub {
......
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment