App-perlimports

 view release on metacpan or  search on metacpan

t/switches-in-import.t  view on Meta::CPAN

use strict;
use warnings;

use App::perlimports::CLI ();
use Capture::Tiny         qw( capture );
use Test::More import => [qw( done_testing is )];

my $expected = <<'EOF';
use strict;
use warnings;

use CustomImport qw( -ignore blib -ignore \\wB\\w );
EOF

local @ARGV = ( '-f', 'test-data/switches-in-import.pl', );
my $cli = App::perlimports::CLI->new;
my ($stdout) = capture {
    $cli->run;
};
is( $stdout, $expected, 'module switches preserved' );

done_testing();



( run in 0.896 second using v1.01-cache-2.11-cpan-007c89162af )