3 use Test::More tests => 1;
5 use MooseX::Runnable::Util::ArgParser;
7 my $str = '-MFoo -Ilib -MBar +Plugout +Plugin --with-args -- MyApp --with args';
9 my $args = MooseX::Runnable::Util::ArgParser->new(
10 argv => [split ' ', $str],
13 local $^X = '/path/to/perl';
14 local $FindBin::Bin = '/path/to';
15 local $FindBin::Script = 'mx-run';
16 my @cmdline = $args->guess_cmdline(
17 perl_flags => ['--X--'],
18 without_plugins => ['Plugout'],
21 is join(' ', @cmdline),
22 "/path/to/perl --X-- /path/to/mx-run -Ilib -MFoo -MBar +Plugin --with-args -- MyApp --with args",
23 'cmdline reverses reasonably';