Skip to content

Commit

Permalink
output some error info if system fails
Browse files Browse the repository at this point in the history
  • Loading branch information
briandfoy committed Jun 22, 2023
1 parent 7229037 commit 746d690
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions t/cp/gh-115-copy-into-dir.t
Expand Up @@ -47,7 +47,9 @@ On Windows, cp a.txt b.txt fails at line 252 with message "cp: can not access B.

subtest 'same directory' => sub {
my $rc = system $^X, $program_path, $filename, $second_filename;
is $rc, 0, 'system exited with 0';
is $rc, 0, 'system exited with 0' or diag(
"system failed:\n\t$!\n\t$^E"
);
ok -e $second_filename, "$second_filename exists";
};

Expand All @@ -59,7 +61,9 @@ Overall, this script has problems with case sensitivity, for example cp a.txt di

subtest 'into directory' => sub {
my $rc = system $^X, $program_path, $filename, $subdir;
is $rc, 0, 'system exited with 0';
is $rc, 0, 'system exited with 0' or diag(
"system failed:\n\t$!\n\t$^E"
);
ok -e catfile( $subdir, $filename ), "$subdir/$second_filename exists";
};

Expand Down

0 comments on commit 746d690

Please sign in to comment.