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 {
51
51
52
52
subtest ' bad command' => sub {
53
53
local $ENV {PATH } = ' ' ;
54
+ my $warnings ;
55
+ local $SIG {__WARN__ } = sub {
56
+ $warnings = $_ [0];
57
+ };
58
+
54
59
my $command = " foo" ;
55
60
ok ! -x $command , " $command is not executable (good)" ;
56
61
57
62
my $message = eval { $release -> run( qq| $command | ) };
58
63
my $at = $@ ;
59
64
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
+ }
61
72
};
62
73
63
74
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
You can’t perform that action at this time.
0 commit comments