line |
stmt |
bran |
cond |
sub |
time |
code |
1
|
|
|
|
|
|
#!./perl |
2
|
|
|
|
|
|
|
3
|
|
|
|
|
|
BEGIN { |
4
|
1
|
50
|
|
1
|
7
|
chdir 't' if -d 't'; |
5
|
1
|
|
|
|
4
|
@INC = '../lib'; |
6
|
1
|
|
|
|
5
|
require Config; import Config; |
|
1
|
|
|
|
23
|
|
7
|
1
|
50
|
|
|
11
|
if ($Config{'extensions'} !~ /\bFile\/Glob\b/i) { |
8
|
0
|
|
|
|
0
|
print "1..0\n"; |
9
|
0
|
|
|
|
0
|
exit 0; |
10
|
|
|
|
|
|
} |
11
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
443
|
use Test::More tests => 7; |
|
1
|
|
|
|
20559
|
|
|
1
|
|
|
|
11
|
|
14
|
|
|
|
|
|
|
15
|
|
|
|
|
|
BEGIN { |
16
|
1
|
|
|
1
|
549
|
use_ok('File::Glob', qw(:glob csh_glob)); |
17
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
19
|
1
|
|
|
|
112606
|
my $pat = "op/G*.t"; |
20
|
|
|
|
|
|
|
21
|
1
|
|
|
|
47
|
import File::Glob ':nocase'; |
22
|
1
|
|
|
|
342
|
@a = csh_glob($pat); |
23
|
1
|
|
|
|
7
|
cmp_ok(scalar @a, '>=', 8, 'use of the case sensitivity tags, via csh_glob()'); |
24
|
|
|
|
|
|
|
25
|
|
|
|
|
|
# This may fail on systems which are not case-PRESERVING |
26
|
1
|
|
|
|
451
|
import File::Glob ':case'; |
27
|
1
|
|
|
|
193
|
@a = csh_glob($pat); |
28
|
1
|
|
|
|
8
|
is(scalar @a, 0, 'None should be uppercase'); |
29
|
|
|
|
|
|
|
30
|
1
|
|
|
|
612
|
@a = bsd_glob($pat, GLOB_NOCASE); |
31
|
1
|
|
|
|
7
|
cmp_ok(scalar @a, '>=', 3, 'explicit use of the GLOB_NOCASE flag'); |
32
|
|
|
|
|
|
|
33
|
|
|
|
|
|
# Test Win32 backslash nastiness... |
34
|
1
|
50
|
33
|
|
16
|
SKIP: { |
35
|
1
|
|
|
|
401
|
skip 'Not Win32 or NetWare', 3 unless $^O eq 'MSWin32' || $^O eq 'NetWare'; |
36
|
|
|
|
|
|
|
37
|
0
|
|
|
|
0
|
@a = File::Glob::glob("op\\g*.t"); |
38
|
0
|
|
|
|
0
|
cmp_ok(scalar @a, '>=', 8); |
39
|
0
|
|
|
|
0
|
mkdir "[]", 0; |
40
|
0
|
|
|
|
0
|
@a = File::Glob::glob("\\[\\]", GLOB_QUOTE); |
41
|
0
|
|
|
|
0
|
rmdir "[]"; |
42
|
0
|
|
|
|
0
|
is(scalar @a, 1); |
43
|
0
|
|
|
|
0
|
@a = bsd_glob("op\\*", GLOB_QUOTE); |
44
|
0
|
|
|
|
0
|
isnt(scalar @a, 0); |
45
|
|
|
|
|
|
} |