File: alien_build_plugin_extract_commandline__tar_can.t

package info (click to toggle)
libalien-build-perl 2.84-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,116 kB
  • sloc: perl: 10,350; ansic: 134; sh: 66; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 627 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use 5.008004;
use Test2::V0 -no_srand => 1;
use Test::Alien::Build;
use Alien::Build::Plugin::Extract::CommandLine;

eval { require Readonly; Readonly->VERSION('1.60') }; ## no critic (Community::PreferredAlternatives)
skip_all 'test requires Readonly 1.60' if $@;

subtest 'tar can' => sub {
  my $build = alienfile filename => 'corpus/blank/alienfile';
  my $meta = $build->meta;

  my $plugin = Alien::Build::Plugin::Extract::CommandLine->new;

  Readonly::Scalar($_ => 'a');
  $plugin->init($meta);

  ok lives {
    $plugin->_tar_can('.tar.gz');
  }, 'can read from <DATA> with readonly $_' or note($@);
};

done_testing;