BEGIN {
chdir 't' if -d 't';
- unshift @INC, '../lib';
+ @INC = '../lib';
require Config; import Config;
if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
print "1..0\n";
($name, $home) = (getpwuid($>))[0,7];
1;
} and do {
- @a = File::Glob::glob("~$name", GLOB_TILDE);
+ @a = bsd_glob("~$name", GLOB_TILDE);
if (scalar(@a) != 1 || $a[0] ne $home || GLOB_ERROR) {
print "not ";
}
# check backslashing
# should return a list with one item, and not set ERROR
-@a = File::Glob::glob('TEST', GLOB_QUOTE);
+@a = bsd_glob('TEST', GLOB_QUOTE);
if (scalar @a != 1 || $a[0] ne 'TEST' || GLOB_ERROR) {
local $/ = "][";
print "# [@a]\n";
# check nonexistent checks
# should return an empty list
# XXX since errfunc is NULL on win32, this test is not valid there
-@a = File::Glob::glob("asdfasdf", 0);
+@a = bsd_glob("asdfasdf", 0);
if ($^O ne 'MSWin32' and scalar @a != 0) {
print "# |@a|\nnot ";
}
else {
$dir = "PtEeRsLt.dir";
mkdir $dir, 0;
- @a = File::Glob::glob("$dir/*", GLOB_ERR);
+ @a = bsd_glob("$dir/*", GLOB_ERR);
#print "\@a = ", array(@a);
rmdir $dir;
if (scalar(@a) != 0 || GLOB_ERROR == 0) {
}
# check for csh style globbing
-@a = File::Glob::glob('{a,b}', GLOB_BRACE | GLOB_NOMAGIC);
+@a = bsd_glob('{a,b}', GLOB_BRACE | GLOB_NOMAGIC);
unless (@a == 2 and $a[0] eq 'a' and $a[1] eq 'b') {
print "not ";
}
print "ok 7\n";
-@a = File::Glob::glob(
+@a = bsd_glob(
'{TES*,doesntexist*,a,b}',
GLOB_BRACE | GLOB_NOMAGIC | ($^O eq 'VMS' ? GLOB_NOCASE : 0)
);
# "~" should expand to $ENV{HOME}
$ENV{HOME} = "sweet home";
-@a = File::Glob::glob('~', GLOB_TILDE | GLOB_NOMAGIC);
+@a = bsd_glob('~', GLOB_TILDE | GLOB_NOMAGIC);
unless (@a == 1 and $a[0] eq $ENV{HOME}) {
print "not ";
}