File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,24 @@ subtest 'undef arg' => sub {
5151
5252subtest ' bad command' => sub {
5353 local $ENV {PATH } = ' ' ;
54+ my $warnings ;
55+ local $SIG {__WARN__ } = sub {
56+ $warnings = $_ [0];
57+ };
58+
5459 my $command = " foo" ;
5560 ok ! -x $command , " $command is not executable (good)" ;
5661
5762 my $message = eval { $release -> run( qq| $command | ) };
5863 my $at = $@ ;
5964 ok defined $at , " Bad command dies" ;
60- 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+ }
6172 };
6273
6374# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
You can’t perform that action at this time.
0 commit comments