diff options
author | Karl Williamson <khw@cpan.org> | 2020-05-29 09:55:45 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-07-17 22:04:08 -0600 |
commit | 95a573f15fa8cceebc3a6436fab9a21bb9681e7e (patch) | |
tree | 1256e357a54e7d9a2cad92fcc39ac0444d5be7a6 /ext/File-Glob | |
parent | 1cc44f9240d8164215b8e3a56cf671c7394e791b (diff) | |
download | perl-95a573f15fa8cceebc3a6436fab9a21bb9681e7e.tar.gz |
ext/File-Glob/t/basic.t: Check error returns
This test was blindly assuming various system calls succeed.
Permissions problems, for one, could cause failures.
Diffstat (limited to 'ext/File-Glob')
-rw-r--r-- | ext/File-Glob/t/basic.t | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/File-Glob/t/basic.t b/ext/File-Glob/t/basic.t index d23ec7499b..036d7d55f6 100644 --- a/ext/File-Glob/t/basic.t +++ b/ext/File-Glob/t/basic.t @@ -182,8 +182,8 @@ is_deeply(\@a, ['TEST', 'a', 'b'], "Got list of 3 elements, including 'TEST'"); } # GLOB_ALPHASORT (default) should sort alphabetically regardless of case -mkdir "pteerslo", 0777; -chdir "pteerslo"; +mkdir "pteerslo", 0777 or die "mkdir 'pteerslo', 0777: $!"; +chdir "pteerslo" or die "chdir 'pteerslo' $!"; my @f_names = qw(Ax.pl Bx.pl Cx.pl aY.pl bY.pl cY.pl); my @f_alpha = qw(Ax.pl aY.pl Bx.pl bY.pl Cx.pl cY.pl); @@ -196,8 +196,8 @@ if ($^O eq 'VMS') { # VMS is happily caseignorant } for (@f_names) { - open T, '>', $_; - close T; + open T, '>', $_ or die "Couldn't write to '$_': $!"; + close T or die "Couldn't close '$_': $!"; } my $pat = "*.pl"; |