summaryrefslogtreecommitdiff
path: root/t/lib/glob-case.t
diff options
context:
space:
mode:
authorChris Nandor <pudge@pobox.com>2001-03-30 11:51:00 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-30 22:45:45 +0000
commit7369a5240f1efb9ab50b6f47289fb602aaaccc25 (patch)
tree8bd35f245afe232b7bb3bbb4d775377fc9f3dac3 /t/lib/glob-case.t
parentf76dcffd2a85ebbf391d02c50da184b1b8a1232e (diff)
downloadperl-7369a5240f1efb9ab50b6f47289fb602aaaccc25.tar.gz
File::Glob stuff for Mac OS
Message-Id: <p05010400b6eaab36051c@[10.0.1.177]> p4raw-id: //depot/perl@9479
Diffstat (limited to 't/lib/glob-case.t')
-rwxr-xr-xt/lib/glob-case.t15
1 files changed, 11 insertions, 4 deletions
diff --git a/t/lib/glob-case.t b/t/lib/glob-case.t
index 56d35f3d03..881470cf84 100755
--- a/t/lib/glob-case.t
+++ b/t/lib/glob-case.t
@@ -2,7 +2,12 @@
BEGIN {
chdir 't' if -d 't';
- @INC = '../lib';
+ if ($^O eq 'MacOS') {
+ @INC = qw(: ::lib ::macos:lib);
+ } else {
+ @INC = '.';
+ push @INC, '../lib';
+ }
require Config; import Config;
if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
print "1..0\n";
@@ -17,20 +22,22 @@ use File::Glob qw(:glob csh_glob);
$loaded = 1;
print "ok 1\n";
+my $pat = $^O eq "MacOS" ? ":lib:G*.t" : "lib/G*.t";
+
# Test the actual use of the case sensitivity tags, via csh_glob()
import File::Glob ':nocase';
-@a = csh_glob("lib/G*.t"); # At least glob-basic.t glob-case.t glob-global.t
+@a = csh_glob($pat); # At least glob-basic.t glob-case.t glob-global.t
print "not " unless @a >= 3;
print "ok 2\n";
# This may fail on systems which are not case-PRESERVING
import File::Glob ':case';
-@a = csh_glob("lib/G*.t"); # None should be uppercase
+@a = csh_glob($pat); # None should be uppercase
print "not " unless @a == 0;
print "ok 3\n";
# Test the explicit use of the GLOB_NOCASE flag
-@a = bsd_glob("lib/G*.t", GLOB_NOCASE);
+@a = bsd_glob($pat, GLOB_NOCASE);
print "not " unless @a >= 3;
print "ok 4\n";