diff options
author | James E Keenan <jkeenan@cpan.org> | 2018-10-13 15:48:39 -0400 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2018-10-17 08:14:27 -0400 |
commit | df8b709bfcaea9932dd434f18393bfcb4e3d5568 (patch) | |
tree | 19a07cf4d30729475da92f7161d62954420ece5e /ext/File-Glob/t/basic.t | |
parent | d8ff3e95e0f2357b6f26f5a94c52c46231fb1a74 (diff) | |
download | perl-df8b709bfcaea9932dd434f18393bfcb4e3d5568.tar.gz |
Remove File::Glob::glob() in perl-5.30
For: RT # 133586
Diffstat (limited to 'ext/File-Glob/t/basic.t')
-rw-r--r-- | ext/File-Glob/t/basic.t | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/ext/File-Glob/t/basic.t b/ext/File-Glob/t/basic.t index f0363cdcdb..6ac911c6d5 100644 --- a/ext/File-Glob/t/basic.t +++ b/ext/File-Glob/t/basic.t @@ -44,17 +44,20 @@ if (opendir(D, ".")) { @correct = grep { !/^\./ } sort readdir(D); closedir D; } -my @a = do {no warnings 'deprecated'; File::Glob::glob("*", 0);}; -@a = sort @a; -if (GLOB_ERROR) { - fail(GLOB_ERROR); -} else { - is_deeply(\@a, \@correct); +{ + local $@; + my $expect = + qr/File::Glob::glob\(\) was removed in perl 5\.30\. Use File::Glob::bsd_glob\(\) instead/; + eval { File::Glob::glob("*", 0); }; + like $@, $expect, + "Got expected error message for removal of File::Glob::glob()"; } chdir '..' or die "chdir .. $!"; # look up the user's home directory # should return a list with one item, and not set ERROR +my @a; + SKIP: { my ($name, $home); skip $^O, 1 if $^O eq 'MSWin32' || $^O eq 'NetWare' || $^O eq 'VMS' |