App-Cme

 view release on metacpan or  search on metacpan

t/cme-command.t  view on Meta::CPAN

);


# test cme run real script with arguments
my $i=0;
foreach my $test ( @script_tests) {
    subtest $test->{label} => sub {
        $conf_file->spew_utf8(@orig);
        my $script = $wr_dir->child('my-script'.$i++.'.cme');
        $script->spew_utf8( map { "$_\n"} @{$test->{script}});
        $script->chmod("0755") if $test->{exec_mode};

        my $cmd = [
            run => $script->stringify,
            '-root-dir' => $wr_dir->stringify,
            @{$test->{args} // []}
        ];
        note("cme command: cme @$cmd");
        my $ok = test_app('App::Cme' => $cmd);
        is( $ok->error, undef, 'threw no exceptions');
        is( $ok->exit_code, 0, "all went well" ) or diag("Failed command: @$cmd");



( run in 0.406 second using v1.01-cache-2.11-cpan-496ff517765 )