diff --git a/t/80-fatal-errors.t b/t/80-fatal-errors.t index 6e0dfdd..3d347a0 100644 --- a/t/80-fatal-errors.t +++ b/t/80-fatal-errors.t @@ -15,7 +15,7 @@ use Test::Fatal; path(qw(source dist.ini)) => simple_ini( [ GatherDir => ], [ MetaConfig => ], - [ 'Run::BeforeBuild' => { run => [ qq{"$^X" -le"exit 2"} ] } ], + [ 'Run::BeforeBuild' => { run => [ qq{"$^X" -le"exit 42"} ] } ], ), path(qw(source lib Foo.pm)) => "package Foo;\n1;\n", }, @@ -25,15 +25,15 @@ use Test::Fatal; $tzil->chrome->logger->set_debug(1); like( exception { $tzil->build }, - qr/command exited with status 2 \(512\)/, + qr/command exited with status 42 \(10752\)/, 'build failed, reporting the error from the run command', ); cmp_deeply( $tzil->log_messages, superbagof( - qq{[Run::BeforeBuild] executing: "$^X" -le"exit 2"}, - '[Run::BeforeBuild] command exited with status 2 (512)', + qq{[Run::BeforeBuild] executing: "$^X" -le"exit 42"}, + '[Run::BeforeBuild] command exited with status 42 (10752)', ), 'log messages list what happened', ); @@ -47,7 +47,7 @@ use Test::Fatal; class => 'Dist::Zilla::Plugin::Run::BeforeBuild', config => { 'Dist::Zilla::Plugin::Run::Role::Runner' => { - run => [ qq{"$^X" -le"exit 2"} ], + run => [ qq{"$^X" -le"exit 42"} ], fatal_errors => 1, quiet => 0, version => Dist::Zilla::Plugin::Run::Role::Runner->VERSION, @@ -134,7 +134,7 @@ use Test::Fatal; path(qw(source dist.ini)) => simple_ini( [ GatherDir => ], [ MetaConfig => ], - [ 'Run::BeforeBuild' => { run => [ qq{"$^X" "exit 2"} ], fatal_errors => 0, } ], + [ 'Run::BeforeBuild' => { run => [ qq{"$^X" -le"exit 42"} ], fatal_errors => 0, } ], ), path(qw(source lib Foo.pm)) => "package Foo;\n1;\n", }, @@ -151,8 +151,8 @@ use Test::Fatal; cmp_deeply( $tzil->log_messages, superbagof( - qq{[Run::BeforeBuild] executing: "$^X" "exit 2"}, - '[Run::BeforeBuild] command exited with status 2 (512)', + qq{[Run::BeforeBuild] executing: "$^X" -le"exit 42"}, + '[Run::BeforeBuild] command exited with status 42 (10752)', ), 'log messages list what happened', ); @@ -166,7 +166,7 @@ use Test::Fatal; class => 'Dist::Zilla::Plugin::Run::BeforeBuild', config => { 'Dist::Zilla::Plugin::Run::Role::Runner' => { - run => [ qq{"$^X" "exit 2"} ], + run => [ qq{"$^X" -le"exit 42"} ], fatal_errors => 0, quiet => 0, version => Dist::Zilla::Plugin::Run::Role::Runner->VERSION, diff --git a/t/92-quiet.t b/t/92-quiet.t index 8117f84..eacaa1c 100644 --- a/t/92-quiet.t +++ b/t/92-quiet.t @@ -13,7 +13,7 @@ my @configs = ( eval => [ qq{die "oh noes"} ], }, { - run => [ qq{"$^X" -le"exit 2"} ], + run => [ qq{"$^X" -le"exit 42"} ], eval => [ qq{print "# hello this is an eval command\\xa"} ], } ); @@ -78,7 +78,7 @@ foreach my $quiet (0, 1) superbagof( @run_messages, re(qr/^\[plugin 0\] evaluation died: oh noes/), - '[plugin 1] command exited with status 2 (512)', + '[plugin 1] command exited with status 42 (10752)', ), "saw expected log messages when quiet=$quiet, verbose=$verbose", ); @@ -123,7 +123,7 @@ foreach my $quiet (0, 1) path(qw(source dist.ini)) => simple_ini( [ GatherDir => ], [ MetaConfig => ], - [ 'Run::BeforeBuild' => { quiet => 1, run => [ qq{"$^X" -le"print q/hi/; exit 2"} ] } ], + [ 'Run::BeforeBuild' => { quiet => 1, run => [ qq{"$^X" -le"print q/hi/; exit 42"} ] } ], ), path(qw(source lib Foo.pm)) => "package Foo;\n1;\n", }, @@ -133,16 +133,16 @@ foreach my $quiet (0, 1) $tzil->chrome->logger->set_debug(0); # explicitly *not* --verbose mode! like( exception { $tzil->build }, - qr/command exited with status 2 \(512\)/, + qr/command exited with status 42 \(10752\)/, 'build failed, reporting the error from the run command', ); cmp_deeply( $tzil->log_messages, superbagof( - qq{[Run::BeforeBuild] executed: "$^X" -le"print q/hi/; exit 2"}, + qq{[Run::BeforeBuild] executed: "$^X" -le"print q/hi/; exit 42"}, '[Run::BeforeBuild] hi', - '[Run::BeforeBuild] command exited with status 2 (512)', + '[Run::BeforeBuild] command exited with status 42 (10752)', ), 'log messages list what happened, after the fact', ); @@ -156,7 +156,7 @@ foreach my $quiet (0, 1) class => 'Dist::Zilla::Plugin::Run::BeforeBuild', config => { 'Dist::Zilla::Plugin::Run::Role::Runner' => { - run => [ qq{"$^X" -le"print q/hi/; exit 2"} ], + run => [ qq{"$^X" -le"print q/hi/; exit 42"} ], fatal_errors => 1, quiet => 1, version => Dist::Zilla::Plugin::Run::Role::Runner->VERSION,