6 @INC = qw(: ::lib ::macos:lib);
11 require Config; import Config;
12 if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) {
19 print "not ok 1\n" unless $loaded;
21 use File::Glob qw(:glob csh_glob);
25 my $pat = $^O eq "MacOS" ? ":lib:G*.t" : "lib/G*.t";
27 # Test the actual use of the case sensitivity tags, via csh_glob()
28 import File::Glob ':nocase';
29 @a = csh_glob($pat); # At least glob-basic.t glob-case.t glob-global.t
30 print "not " unless @a >= 3;
33 # This may fail on systems which are not case-PRESERVING
34 import File::Glob ':case';
35 @a = csh_glob($pat); # None should be uppercase
36 print "not " unless @a == 0;
39 # Test the explicit use of the GLOB_NOCASE flag
40 @a = bsd_glob($pat, GLOB_NOCASE);
41 print "not " unless @a >= 3;
44 # Test Win32 backslash nastiness...
45 if ($^O ne 'MSWin32') {
46 print "ok 5\nok 6\nok 7\n";
49 @a = File::Glob::glob("lib\\g*.t");
50 print "not " unless @a >= 3;
53 @a = File::Glob::glob("\\[\\]", GLOB_QUOTE);
55 print "# returned @a\nnot " unless @a == 1;
57 @a = bsd_glob("lib\\*", GLOB_QUOTE);
58 print "not " if @a == 0;