We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2de9e09 commit e4643faCopy full SHA for e4643fa
t/run.t
@@ -51,13 +51,24 @@ subtest 'undef arg' => sub {
51
52
subtest 'bad command' => sub {
53
local $ENV{PATH} = '';
54
+ my $warnings;
55
+ local $SIG{__WARN__} = sub {
56
+ $warnings = $_[0];
57
+ };
58
+
59
my $command = "foo";
60
ok ! -x $command, "$command is not executable (good)";
61
62
my $message = eval { $release->run( qq|$command| ) };
63
my $at = $@;
64
ok defined $at, "Bad command dies";
- like $at, qr/Could not open command/, "Error message with bad command";
65
66
+ if( $^O eq 'MSWin32' ) {
67
+ like $warnings, qr/'foo' is not recognized/, 'Saw Windows error';
68
+ }
69
+ else {
70
+ like $at, qr/Could not open command/, "Error message with bad command";
71
72
};
73
74
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
0 commit comments