File: private.t

package info (click to toggle)
libcpan-mini-inject-perl 1.012-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 352 kB
  • sloc: perl: 732; makefile: 4
file content (32 lines) | stat: -rw-r--r-- 701 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
24
25
26
27
28
29
30
31
32
#!perl

use strict;
use warnings;

use CPAN::Mini::Inject;
use Test::More;

subtest '_fmtmodule' => sub {
  my @tests = (
    {
      in => [ 'foo', 'foo.tar.gz', '0.01' ],
      out => 'foo                                0.01  foo.tar.gz',
    },
    {
      in => [
        'fooIsAModuleWithAReallyLongNameSoLong'
         . 'InFactThatItScrewsWithTheFormatting',
        'foo.tar.gz',
        '0.01'
      ],
      out => 'fooIsAModuleWithAReallyLongNameSoLong'
       . 'InFactThatItScrewsWithTheFormatting 0.01  foo.tar.gz',
    },
  );
  for my $test ( @tests ) {
    my $got = CPAN::Mini::Inject::_fmtmodule( @{ $test->{in} } );
    is $got, $test->{out}, '_fmtmodule';
  }
};

done_testing();